/* ================= PlayerSettings_MenuEvent ================= */ static void PlayerSettings_MenuEvent( void* ptr, int event ) { if( event != QM_ACTIVATED ) { return; } switch( ((menucommon_s*)ptr)->id ) { case ID_HANDICAP: trap_Cvar_Set( "handicap", va( "%i", 100 - 25 * s_playersettings.handicap.curvalue ) ); break; case ID_EFFECTS: trap_Cvar_Set( "color1", va( "%i %i %i", uitogamecode[s_playersettings.effects.curvalue], uitogamecode[s_playersettings.effects2.curvalue], uitogamecode[s_playersettings.effects3.curvalue] ) ); break; case ID_EFFECTS2: trap_Cvar_Set( "color1", va( "%i %i %i", uitogamecode[s_playersettings.effects.curvalue], uitogamecode[s_playersettings.effects2.curvalue], uitogamecode[s_playersettings.effects3.curvalue] ) ); break; case ID_EFFECTS3: trap_Cvar_Set( "color1", va( "%i %i %i", uitogamecode[s_playersettings.effects.curvalue], uitogamecode[s_playersettings.effects2.curvalue], uitogamecode[s_playersettings.effects3.curvalue] ) ); break; case ID_MODEL: PlayerSettings_SaveChanges(); UI_PlayerModelMenu(); break; case ID_BACK: PlayerSettings_SaveChanges(); UI_PopMenu(); break; } }
/* ================= PlayerSettings_MenuEvent ================= */ static void PlayerSettings_MenuEvent(void* ptr, int event) { if (event != QM_ACTIVATED) { return; } switch (((menucommon_s*) ptr)->id) { case ID_MODEL: PlayerSettings_SaveChanges(); UI_PlayerModelMenu(); break; case ID_BACK: PlayerSettings_SaveChanges(); UI_PopMenu(); break; } }
/* ================= PlayerSettings_MenuEvent ================= */ static void PlayerSettings_MenuEvent( void* ptr, int event ) { if( event != QM_ACTIVATED ) { return; } switch( ((menucommon_s*)ptr)->id ) { case ID_HANDICAP: trap_Cvar_Set( "handicap", va( "%i", 100 - 10 * s_playersettings.handicap.curvalue ) ); break; case ID_MODEL: PlayerSettings_SaveChanges(); UI_PlayerModelMenu(); break; case ID_BACK: PlayerSettings_SaveChanges(); UI_PopMenu(); break; } }
/* ================= PlayerSettings_MenuKey ================= */ static sfxHandle_t PlayerSettings_MenuKey(int key) { if (key == K_MOUSE2 || key == K_ESCAPE) { PlayerSettings_SaveChanges(); } return Menu_DefaultKey(&s_playersettings.menu, key); }