8 http://www.newbreedsoftware.com/supertux/
13 #ifndef SUPERTUX_MENU_H
14 #define SUPERTUX_MENU_H
21 /* Kinds of menu items */
32 MN_HL /* horizontal line */
43 string_list_type* list;
47 menu_item_type* menu_item_create(MenuItemKind kind, char *text, int init_toggle, Menu* target_menu);
48 void menu_item_change_text (menu_item_type* pmenu_item, const char *text);
49 void menu_item_change_input(menu_item_type* pmenu_item, const char *text);
54 // position of the menu (ie. center of the menu, not top/left)
66 static void set_current(Menu* pmenu);
71 void additem(menu_item_type* pmenu_item);
72 void additem(MenuItemKind kind, char *text, int init_toggle, Menu* target_menu);
76 void draw_item(int index, int menu_width, int menu_height);
80 /* Action done on the menu */
82 MENU_ACTION_NONE = -1,
92 /* (global) menu variables */
93 extern MenuAction menuaction;
94 extern bool show_menu;
95 extern bool menu_change;
96 extern texture_type checkbox, checkbox_checked, back, arrow_left, arrow_right;
98 extern Menu* main_menu;
99 extern Menu* game_menu;
100 extern Menu* options_menu;
101 extern Menu* highscore_menu;
102 extern Menu* load_game_menu;
103 extern Menu* save_game_menu;
104 extern Menu* current_menu;
105 extern Menu* last_menu;
107 /* input implementation variables */
108 extern int delete_character;
109 extern char mn_input_char;
111 /* Reset the global menu variables */
112 void menu_reset(void);
114 /* "Calculate" and draw the menu */
115 void menu_process_current(void);
117 /* Check for a menu event */
118 void menu_event(SDL_keysym* keysym);
120 #endif /*SUPERTUX_MENU_H*/
122 /* Local Variables: */