Changeset 869
- Timestamp:
- 04/30/08 15:51:52 (4 months ago)
- Files:
-
- trunk/src/cmd4.c (modified) (6 diffs)
- trunk/src/death.c (modified) (1 diff)
- trunk/src/ui-event.h (modified) (1 diff)
- trunk/src/ui-menu.c (modified) (5 diffs)
- trunk/src/ui-menu.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/src/cmd4.c
r864 r869 52 52 #define MOD_COL 121 53 53 #define RESET_VIS 122 54 55 #define OPTION_MENU 14056 #define VISUAL_MENU 14157 #define COLOR_MENU 14258 #define KNOWLEDGE_MENU 14359 #define MACRO_MENU 14460 54 61 55 … … 4215 4209 menu = &option_menu; 4216 4210 WIPE(menu, menu_type); 4217 menu_set_id(menu, OPTION_MENU);4218 4211 menu->title = "Options Menu"; 4219 4212 menu->menu_data = option_actions; … … 4236 4229 menu = ¯o_menu; 4237 4230 WIPE(menu, menu_type); 4238 menu_set_id(menu, MACRO_MENU);4239 4231 menu->title = "Interact with macros"; 4240 4232 menu->cmd_keys = cmd_keys; … … 4247 4239 menu = &visual_menu; 4248 4240 WIPE(menu, menu_type); 4249 menu_set_id(menu, VISUAL_MENU);4250 4241 menu->title = "Interact with visuals"; 4251 4242 menu->cmd_keys = cmd_keys; … … 4258 4249 menu = &color_menu; 4259 4250 WIPE(menu, menu_type); 4260 menu_set_id(menu, COLOR_MENU);4261 4251 menu->title = "Interact with colors"; 4262 4252 menu->cmd_keys = cmd_keys; … … 4269 4259 menu = &knowledge_menu; 4270 4260 WIPE(menu, menu_type); 4271 menu_set_id(menu, KNOWLEDGE_MENU);4272 4261 menu->title = "Display current knowledge"; 4273 4262 menu->menu_data = knowledge_actions; trunk/src/death.c
r864 r869 465 465 menu = &death_menu; 466 466 WIPE(menu, menu_type); 467 menu_set_id(menu, 1);468 467 menu->menu_data = death_actions; 469 468 menu->flags = MN_CASELESS_TAGS; trunk/src/ui-event.h
r868 r869 54 54 typedef struct 55 55 { 56 int object_id; /* Identifier used for macros, etc */57 56 handler_f handler; /* The handler function to call */ 58 57 release_f release; /* Frees any owned resources */ trunk/src/ui-menu.c
r868 r869 38 38 * MN_ACTIONS HELPER FUNCTIONS 39 39 * 40 * MN_ACTIONS is the type of menu iterator that displays a simple list of 40 * MN_ACTIONS is the type of menu iterator that displays a simple list of 41 41 * menu_actions. 42 42 * ------------------------------------------------------------------------ */ 43 43 44 44 /* Display an event, with possible preference overrides */ 45 static void display_action_aux(menu_action *act, int menu_id,byte color, int row, int col, int wid)45 static void display_action_aux(menu_action *act, byte color, int row, int col, int wid) 46 46 { 47 47 /* TODO: add preference support */ … … 58 58 byte color = curs_attrs[CURS_KNOWN][0 != cursor]; 59 59 60 display_action_aux(&acts[oid], menu->target.object_id, color, 61 row, col, width); 60 display_action_aux(&acts[oid], color, row, col, width); 62 61 } 63 62 … … 116 115 byte color = curs_attrs[!(items[oid].flags & (MN_GRAYED))][0 != cursor]; 117 116 118 display_action_aux(&items[oid].act, menu->target.object_id, color, 119 row, col, width); 117 display_action_aux(&items[oid].act, color, row, col, width); 120 118 } 121 119 … … 836 834 } 837 835 838 void menu_set_id(menu_type *menu, int id)839 {840 menu->target.object_id = id;841 }842 843 836 /* ======================== MENU INITIALIZATION ==================== */ 844 837 … … 904 897 905 898 /* Stuff for the event listener (see ui-event.h) */ 906 menu->target.object_id = 0;907 899 menu->target.handler = menu_handle_event; 908 900 menu->target.release = NULL; trunk/src/ui-menu.h
r868 r869 245 245 void menu_set_filter(menu_type *menu, const int object_list[], int n); 246 246 void menu_release_filter(menu_type *menu); 247 void menu_set_id(menu_type *menu, int id);248 247 249 248
