void menu_create(menu_t *menu) { beep(); //GUI_Command(4,0); //press_button(IC_BUTTON_MENU); SendToMC(6, 2, 0); SleepTask(100); FLAG_GUI_MODE = 0x2D; // In theory, we do not need this, but menu_close does not work properly without it... //DPData.gui_mode = 0x2D; // this is not the same as FLAG_GUI_MODE, but so far i do not see what it does current_menu = menu; menu_DPData = DPData; menu_destroy(); menu_initialize(); GUI_Lock(); GUI_PalleteInit(); menu_handler = dialog_create(22, menu_event_handler); //*(int*)((int)(menu_handler+0x58)) = (int)hack_central_handler; //*(int*)((int)(menu_handler+0x7C)) = (int)menu_event_handler; PalettePush(); PaletteChange(current_menu->color); menu_event_display(); GUI_UnLock(); GUI_PalleteUnInit(); }
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //menu_control //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ void menu_control(control *c, bool pop) { // ----------------------------------- //Variables char temp[120]; Menu *m; // menu update support if (false == menu_initialize(c, pop)) return; //Make the new menu //NOTE: Include module name in menu title? Possible menu name duplication is already resolved in make_menu sprintf(temp, "%s (%s)", c->controlname, c->controltypeptr->controltypename); m = make_menu(temp, c); //Add the appropriate menus menu_control_interfaceoptions(m, c); menu_control_controloptions(m, c, "Control Options"); menu_control_windowoptions(m, c, "Window Options"); /* if (c->parentptr) { menu_control_controloptions(m, c->parentptr, "Parent Control Options"); menu_control_windowoptions(m, c->parentptr, "Parent Window Options"); } */ make_submenu_item(m, "Global Options", plugin_menu_settings()); menu_control_pluginoptions(m); //Show the menu show_menu(c, m, pop); }
void menu_update_setactivemodule(void) { if (false == menu_initialize(NULL, false)) return; show_menu(NULL, module_menu_setactivemodule(), false); }
void menu_update_editmodules(void) { if (false == menu_initialize(NULL, false)) return; show_menu(NULL, module_menu_editmodules(), false); }
void menu_update_global(void) { if (false == menu_initialize(NULL, false)) return; show_menu(NULL, plugin_menu_settings(), false); }
void game_initialize_system() { graphics_initialize_system("Mice Alert", SCREEN_WIDTH, SCREEN_HEIGHT, 0); sprite_initialize_system(); entity_initialize_system(); menu_initialize(); mouse_initialize_self(); sound_initialize_system(); atexit(game_close_system); }
void main_timer_initialize(main_timer_t *timer) { #ifdef __DEBUG assert(timer!=NULL); #endif TMR1ON=NOT_SET; TMR1L=0; TMR1H=0; TMR1IF=0; time_initialize(&timer->time); timer->flags.flag_byte=0; timer->flags.segments_flag=SET; timer->flags.dont_reset=SET; main_timer_fill_output_buffer(timer); menu_initialize(&timer->menu); #ifdef __DEBUG assert(main_timer_valid(timer)==1); #endif }
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //menu_shutdown //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ int menu_shutdown() { menu_initialize(NULL, true); //No errors return 0; }