Skip to content

Commit 00e82ec

Browse files
committed
Support setting com_showFPS 2 in Dhewm3SettingsMenu
1 parent 05db996 commit 00e82ec

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

neo/framework/Dhewm3SettingsMenu.cpp

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2333,7 +2333,15 @@ static CVarOption gameOptions[] = {
23332333
CVarOption( "ui_autoSwitch", "Auto Weapon Switch", OT_BOOL ),
23342334
CVarOption( "Visual" ),
23352335
CVarOption( "g_showHud", "Show HUD", OT_BOOL ),
2336-
CVarOption( "com_showFPS", "Show Framerate (FPS)", OT_BOOL ),
2336+
CVarOption( "com_showFPS", []( idCVar& cvar ) {
2337+
int curFormat = idMath::ClampInt( 0, 2, cvar.GetInteger() );
2338+
const char* choices = "Don't show framerate\0Show only framerate\0Show framerate and frame times (avg/min/max)\0";
2339+
if ( ImGui::Combo( "Show Framerate (FPS)", &curFormat, choices ) ) {
2340+
cvar.SetInteger( curFormat );
2341+
}
2342+
AddTooltip( "com_showFPS" );
2343+
AddDescrTooltip( cvar.GetDescription() );
2344+
} ),
23372345
CVarOption( "ui_showGun", "Show Gun Model", OT_BOOL ),
23382346
CVarOption( "g_decals", "Show Decals", OT_BOOL ),
23392347
CVarOption( "g_bloodEffects", "Show Blood and Gibs", OT_BOOL ),

0 commit comments

Comments
 (0)