8 http://www.newbreedsoftware.com/supertux/
13 #ifndef SUPERTUX_MENU_H
14 #define SUPERTUX_MENU_H
21 /* Kinds of menu items */
33 MN_HL, /* horizontal line */
44 string_list_type* list;
48 menu_item_type* menu_item_create(MenuItemKind kind, char *text, int init_toggle, Menu* target_menu);
49 void menu_item_change_text (menu_item_type* pmenu_item, const char *text);
50 void menu_item_change_input(menu_item_type* pmenu_item, const char *text);
55 // position of the menu (ie. center of the menu, not top/left)
68 static void set_current(Menu* pmenu);
73 void additem(menu_item_type* pmenu_item);
74 void additem(MenuItemKind kind, char *text, int init_toggle, Menu* target_menu);
78 void draw_item(int index, int menu_width, int menu_height);
82 /* Action done on the menu */
84 MENU_ACTION_NONE = -1,
94 /* (global) menu variables */
95 extern MenuAction menuaction;
96 extern bool show_menu;
97 extern bool menu_change;
98 extern texture_type checkbox, checkbox_checked, back, arrow_left, arrow_right;
100 extern Menu* main_menu;
101 extern Menu* game_menu;
102 extern Menu* options_menu;
103 extern Menu* options_controls_menu;
104 extern Menu* highscore_menu;
105 extern Menu* load_game_menu;
106 extern Menu* save_game_menu;
107 extern Menu* current_menu;
109 /* input implementation variables */
110 extern int delete_character;
111 extern char mn_input_char;
113 /* Reset the global menu variables */
114 void menu_reset(void);
116 /* "Calculate" and draw the menu */
117 void menu_process_current(void);
119 /* Check for a menu event */
120 void menu_event(SDL_Event& event);
122 #endif /*SUPERTUX_MENU_H*/
124 /* Local Variables: */