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(); }
void menu_set_page(menupage_t *page) { current_menu->current_page = page; menupage_initialize(page); menu_event_open(); menu_event_display(); }
void menupage_pgup(menu_t *menu) { int display = FALSE; menupage_t *page = menu->current_page; if (item_grabbed) return; page->current_posn -= MENU_HEIGHT - 1; if (! (page->items.size > MENU_HEIGHT && settings.menu_wrap)) page->current_posn = MAX(page->current_posn, 0); if (page->current_line > 0) { page->current_line = 0; menu_highlight(page->current_line); } else { display = TRUE; } if (display) menu_event_display(); }
void menupage_down(menu_t *menu) { int display = FALSE; menupage_t *page = menu->current_page; if ((page->items.size > MENU_HEIGHT && settings.menu_wrap) || page->current_posn < page->items.size - 1) { page->current_posn++; if (item_grabbed) { SWAP(page->ordering[get_item_id(page, page->current_posn)], page->ordering[get_item_id(page, page->current_posn - 1)]); display = TRUE; } } if (page->current_line < MIN(MENU_HEIGHT, page->items.size) - 1) { page->current_line++; menu_highlight(page->current_line); } else { display = TRUE; } if (display) menu_event_display(); }
void menupage_pgdown(menu_t *menu) { int display = FALSE; menupage_t *page = menu->current_page; if (item_grabbed) return; page->current_posn += MENU_HEIGHT - 1; if (! (page->items.size > MENU_HEIGHT && settings.menu_wrap)) { page->current_posn = MIN(page->current_posn, page->items.size - 1); } if (page->current_line < MIN(MENU_HEIGHT, page->items.size) - 1) { page->current_line = MIN(MENU_HEIGHT, page->items.size) - 1; menu_highlight(page->current_line); } else { display = TRUE; } if (display) menu_event_display(); }
void reload_language_and_refresh(const menuitem_t *item) { lang_pack_config(); menu_event_display(); }
void menu_params_apply_autoiso_maxiso(const menuitem_t *item) { settings.autoiso_miniso = MIN(settings.autoiso_miniso, settings.autoiso_maxiso); menu_event_display(); }