1 /*SENI, Search for Extra Nibiru Intelligence*/
4 This program is free software: you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation, either version 3 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program. If not, see <http://www.gnu.org/licenses/>.
19 Copyright SSW Team 2010
22 #ifndef __MENU_ENGINE__H_SENI
23 #define __MENU_ENGINE__H_SENI
25 #define WITHOUT_OPTION (0)
27 #define MAX_OPTIONS (20)
29 #define MENU_NO_ERROR (0)
30 #define MENU_ERROR (MENU_NO_ERROR + 1)
31 #define OPTIONS_FULL (MENU_NO_ERROR + 2)
32 #define NO_OPTION (MENU_NO_ERROR + 3)
33 #define MENU_NO_ENGINE (MENU_NO_ERROR + 4)
34 #define OPTION_RETURN (0)
35 #define OPTION_STAY (OPTION_RETURN + 1)
42 typedef int (*option_event
)(SDL_Event
*, Engine
*, Menu
*, Option
*);
48 Option(char *, Engine
*);
49 Option(char *, int, Engine
*);
53 void setEvent(option_event
);
54 int execEvent(SDL_Event
*, Engine
*, Menu
*, Option
*);
57 void setEngine(Engine
*);
77 Menu(char *, Engine
*);
78 Menu(char *, Option
**, int, Engine
*);
79 int setWallpaper(char *);
80 int addOption(Option
*);
81 Option
*getOption(int);
82 Option
*getOptionById(int);
83 int removeOption(int);
86 void setEngine(Engine
*);
88 Option
*options
[MAX_OPTIONS
];
90 SDL_Surface
*Swallpaper
;