int CT_Opt_Video_Key (int key, CTab_t *tab, CTabPage_t *page) { #ifndef GLQUAKE // Software Rendering version menu #ifdef _WIN32 (*vid_menukeyfn) (key); #endif // i was too lazy&scared to change vid_menukeyfn functions out there // so because i know what keys have some function in there, i list them here: return key == K_LEFTARROW || key == K_RIGHTARROW || key == K_DOWNARROW || key == K_UPARROW || key == K_ENTER || key == 'd'; #else // (Open)GL version menu if (mvs_askmode) { if (key == 'y' || key == K_ENTER) KeepNewVideoSettings(); else if (key == 'n' || key == K_ESCAPE) CancelNewVideoSettings(); return true; } else return Settings_Key(&settvideo, key); #endif }
int CT_Opt_System_Key (int key, wchar unichar, CTab_t *tab, CTabPage_t *page) { #ifndef GLQUAKE // SOFT #ifdef _WIN32 if(mss_software_change_resolution_mode) { if(key == K_ESCAPE || key == K_MOUSE2) { mss_software_change_resolution_mode = false; } (*vid_menukeyfn) (key); // i was too lazy&scared to change vid_menukeyfn functions out there // so because i know what keys have some function in there, i list them here: return key == K_ESCAPE || key == K_MOUSE2 || key == K_LEFTARROW || key == K_RIGHTARROW || key == K_DOWNARROW || key == K_UPARROW || key == K_ENTER || key == 'd'; } else { return Settings_Key(&settsystem, key, unichar); } #else return Settings_Key(&settsystem, key, unichar); #endif #else // GL if (mss_askmode) { if (key == 'y' || key == K_ENTER) { KeepNewVideoSettings(); } else if(key == 'n' || key == K_ESCAPE) { CancelNewVideoSettings(); } return true; } else { return Settings_Key(&settsystem, key, unichar); } #endif }
int CT_Opt_System_Key (int key, wchar unichar, CTab_t *tab, CTabPage_t *page) { if (mss_askmode) { if (key == 'y' || key == K_ENTER) { KeepNewVideoSettings(); } else if(key == 'n' || key == K_ESCAPE) { CancelNewVideoSettings(); } return true; } else { return Settings_Key(&settsystem, key, unichar); } }
int CT_Opt_Config_Key(int key, CTab_t *tab, CTabPage_t *page) { switch (MOpt_configpage_mode) { case MOCPM_SETTINGS: return Settings_Key(&settconfig, key); break; case MOCPM_CHOOSECONFIG: if (key == K_ENTER || key == K_MOUSE1) { Cbuf_AddText(va("cfg_load \"%s\"\n", COM_SkipPath(FL_GetCurrentEntry(&configs_filelist)->name))); MOpt_configpage_mode = MOCPM_SETTINGS; return true; } else if (key == K_ESCAPE || key == K_MOUSE2) { MOpt_configpage_mode = MOCPM_SETTINGS; return true; } else return FL_Key(&configs_filelist, key); case MOCPM_CHOOSESCRIPT: if (key == K_ENTER || key == K_MOUSE1) { Cbuf_AddText(va("exec \"cfg/%s\"\n", COM_SkipPath(FL_GetCurrentEntry(&configs_filelist)->name))); MOpt_configpage_mode = MOCPM_SETTINGS; return true; } else if (key == K_ESCAPE || key == K_MOUSE2) { MOpt_configpage_mode = MOCPM_SETTINGS; return true; } else return FL_Key(&configs_filelist, key); case MOCPM_ENTERFILENAME: if (key == K_ENTER || key == K_MOUSE1) { Cbuf_AddText(va("cfg_save \"%s\"\n", MOpt_FileNameInputBoxGetText())); MOpt_configpage_mode = MOCPM_SETTINGS; return true; } else if (key == K_ESCAPE || key == K_MOUSE2) { MOpt_configpage_mode = MOCPM_SETTINGS; return true; } else return MOpt_FileNameInputBoxKey(key); } return false; }
static int CreateGame_Key(int key, wchar unichar, CTab_t *tab, CTabPage_t *page) { return Settings_Key(&create_game_options, key, unichar); }
static int Options_Key(int key, wchar unichar, CTab_t *tab, CTabPage_t *page) { return Settings_Key(&sbsettings, key, unichar); }
int CT_Opt_FPS_Key (int k, CTab_t *tab, CTabPage_t *page) { return Settings_Key(&settfps, k); }
int CT_Opt_Binds_Key (int k, CTab_t *tab, CTabPage_t *page) { return Settings_Key(&settbinds, k); }
int CT_Opt_Player_Key (int k, CTab_t *tab, CTabPage_t *page) { return Settings_Key(&settplayer, k); }
int CT_Opt_HUD_Key (int k, CTab_t *tab, CTabPage_t *page) { return Settings_Key(&setthud, k); }
int CT_Opt_Demo_Spec_Key (int k, CTab_t *tab, CTabPage_t *page) { return Settings_Key(&settdemo_spec, k); }
int CT_Opt_Settings_Key (int k, CTab_t *tab, CTabPage_t *page) { return Settings_Key(&settgeneral, k); }
int CT_Demo_Options_Key(int key, wchar unichar, CTab_t *tab, CTabPage_t *page) { return Settings_Key(&demoplsett, key, unichar); }
int CT_Opt_FPS_Key (int k, wchar unichar, CTab_t *tab, CTabPage_t *page) { return Settings_Key(&settfps, k, unichar); }
int CT_Opt_Player_Key (int k, wchar unichar, CTab_t *tab, CTabPage_t *page) { return Settings_Key(&settplayer, k, unichar); }
int CT_Opt_View_Key (int k, wchar unichar, CTab_t *tab, CTabPage_t *page) { return Settings_Key(&settview, k, unichar); }