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)
67 static void set_current(Menu* pmenu);
72 void additem(menu_item_type* pmenu_item);
73 void additem(MenuItemKind kind, char *text, int init_toggle, Menu* target_menu);
77 void draw_item(int index, int menu_width, int menu_height);
81 /* Action done on the menu */
83 MENU_ACTION_NONE = -1,
93 /* (global) menu variables */
94 extern MenuAction menuaction;
95 extern bool show_menu;
96 extern bool menu_change;
97 extern texture_type checkbox, checkbox_checked, back, arrow_left, arrow_right;
99 extern Menu* main_menu;
100 extern Menu* game_menu;
101 extern Menu* options_menu;
102 extern Menu* options_controls_menu;
103 extern Menu* highscore_menu;
104 extern Menu* load_game_menu;
105 extern Menu* save_game_menu;
106 extern Menu* current_menu;
108 /* input implementation variables */
109 extern int delete_character;
110 extern char mn_input_char;
112 /* Reset the global menu variables */
113 void menu_reset(void);
115 /* "Calculate" and draw the menu */
116 void menu_process_current(void);
118 /* Check for a menu event */
119 void menu_event(SDL_keysym* keysym);
121 #endif /*SUPERTUX_MENU_H*/
123 /* Local Variables: */