Skip to content

Commit

Permalink
Client: Options: HUD: Add hud_menu_fkeys (#229)
Browse files Browse the repository at this point in the history
  • Loading branch information
tmp64 committed Sep 29, 2024
1 parent 09212fb commit c5ad82b
Show file tree
Hide file tree
Showing 8 changed files with 39 additions and 7 deletions.
Binary file modified gamedir/ui/resource/language/bugfixedhl_english.txt
Binary file not shown.
Binary file modified gamedir/ui/resource/language/bugfixedhl_russian.txt
Binary file not shown.
6 changes: 3 additions & 3 deletions gamedir/ui/resource/options/HudSubOptions.res
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,10 @@
"useproportionalinsets" "0"
"Default" "0"
}
"ViewmodelCheckbox"
"MenuFKeys"
{
"ControlName" "CCvarCheckButton"
"fieldName" "ViewmodelCheckbox"
"fieldName" "MenuFKeys"
"xpos" "31"
"ypos" "112"
"wide" "244"
Expand All @@ -155,7 +155,7 @@
"visible" "1"
"enabled" "1"
"tabPosition" "0"
"labelText" "#BHL_AdvOptions_HUD_Viewmodel"
"labelText" "#BHL_AdvOptions_HUD_MenuFKeys"
"textAlignment" "west"
"dulltext" "0"
"brighttext" "0"
Expand Down
28 changes: 28 additions & 0 deletions gamedir/ui/resource/options/ModelSubOptions.res
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,34 @@
"useproportionalinsets" "0"
"Default" "0"
}
"NoViewModel"
{
"ControlName" "CCvarCheckButton"
"fieldName" "NoViewModel"
"xpos" "193"
"ypos" "262"
"wide" "256"
"tall" "24"
"autoResize" "0"
"pinCorner" "0"
"RoundedCorners" "15"
"pin_corner_to_sibling" "0"
"pin_to_sibling_corner" "0"
"visible" "1"
"enabled" "1"
"tabPosition" "0"
"labelText" "#BHL_AdvOptions_Models_NoViewModel"
"textAlignment" "west"
"dulltext" "0"
"brighttext" "0"
"wrap" "0"
"centerwrap" "0"
"textinsetx" "6"
"textinsety" "0"
"autowidetocontents" "0"
"useproportionalinsets" "0"
"Default" "0"
}
"EnemyModelsLabel"
{
"ControlName" "Label"
Expand Down
6 changes: 3 additions & 3 deletions src/game/client/gameui/options/options_hud.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ CHudSubOptions::CHudSubOptions(vgui2::Panel *parent)

m_pRenderCheckbox = new CCvarCheckButton(this, "RenderCheckbox", "#BHL_AdvOptions_HUD_Render", "hud_client_renderer");
m_pDimCheckbox = new CCvarCheckButton(this, "DimCheckbox", "#BHL_AdvOptions_HUD_Dim", "hud_dim");
m_pViewmodelCheckbox = new CCvarCheckButton(this, "ViewmodelCheckbox", "#BHL_AdvOptions_HUD_Viewmodel", "r_drawviewmodel", true);
m_pMenuFKeys = new CCvarCheckButton(this, "MenuFKeys", "#BHL_AdvOptions_HUD_MenuFKeys", "hud_menu_fkeys");
m_pWeaponSpriteCheckbox = new CCvarCheckButton(this, "WeaponSpriteCheckbox", "#BHL_AdvOptions_HUD_WeapSprite", "hud_weapon");
m_pCenterIdCvar = new CCvarCheckButton(this, "CenterIdCvar", "#BHL_AdvOptions_HUD_CenterId", "hud_centerid");
m_pRainbowCvar = new CCvarCheckButton(this, "RainbowCvar", "#BHL_AdvOptions_HUD_Rainbow", "hud_rainbow");
Expand Down Expand Up @@ -79,7 +79,7 @@ void CHudSubOptions::OnResetData()

m_pOpacityValue->ResetData();
m_pDimCheckbox->ResetData();
m_pViewmodelCheckbox->ResetData();
m_pMenuFKeys->ResetData();
m_pWeaponSpriteCheckbox->ResetData();
m_pCenterIdCvar->ResetData();
m_pRainbowCvar->ResetData();
Expand All @@ -104,7 +104,7 @@ void CHudSubOptions::OnApplyChanges()

m_pOpacityValue->ApplyChanges();
m_pDimCheckbox->ApplyChanges();
m_pViewmodelCheckbox->ApplyChanges();
m_pMenuFKeys->ApplyChanges();
m_pWeaponSpriteCheckbox->ApplyChanges();
m_pCenterIdCvar->ApplyChanges();
m_pRainbowCvar->ApplyChanges();
Expand Down
2 changes: 1 addition & 1 deletion src/game/client/gameui/options/options_hud.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class CHudSubOptions : public vgui2::PropertyPage
CCvarCheckButton *m_pRenderCheckbox = nullptr;
CCvarCheckButton *m_pDimCheckbox = nullptr;
CCvarCheckButton *m_pWeaponSpriteCheckbox = nullptr;
CCvarCheckButton *m_pViewmodelCheckbox = nullptr;
CCvarCheckButton *m_pMenuFKeys = nullptr;
CCvarCheckButton *m_pCenterIdCvar = nullptr;
CCvarCheckButton *m_pRainbowCvar = nullptr;

Expand Down
3 changes: 3 additions & 0 deletions src/game/client/gameui/options/options_models.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ CModelSubOptions::CModelSubOptions(vgui2::Panel *parent)
m_pLeftHand = new CCvarCheckButton(this, "LeftHand", "#BHL_AdvOptions_Models_LeftHand", "cl_righthand");
m_pAngledBob = new CCvarCheckButton(this, "AngledBob", "#BHL_AdvOptions_Models_AngledBob", "cl_bob_angled");
m_pNoShells = new CCvarCheckButton(this, "NoShells", "#BHL_AdvOptions_Models_NoShells", "cl_noshells");
m_pNoViewModel = new CCvarCheckButton(this, "NoViewModel", "#BHL_AdvOptions_Models_NoViewmodel", "r_drawviewmodel", true);

LoadControlSettings(VGUI2_ROOT_DIR "resource/options/ModelSubOptions.res");
}
Expand Down Expand Up @@ -98,6 +99,7 @@ void CModelSubOptions::OnResetData()
m_pLeftHand->ResetData();
m_pAngledBob->ResetData();
m_pNoShells->ResetData();
m_pNoViewModel->ResetData();
}

void CModelSubOptions::OnApplyChanges()
Expand All @@ -110,6 +112,7 @@ void CModelSubOptions::OnApplyChanges()
m_pLeftHand->ApplyChanges();
m_pAngledBob->ApplyChanges();
m_pNoShells->ApplyChanges();
m_pNoViewModel->ApplyChanges();
}

void CModelSubOptions::ParseEnemyModels()
Expand Down
1 change: 1 addition & 0 deletions src/game/client/gameui/options/options_models.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ class CModelSubOptions : public vgui2::PropertyPage
CCvarCheckButton *m_pLeftHand = nullptr;
CCvarCheckButton *m_pAngledBob = nullptr;
CCvarCheckButton *m_pNoShells = nullptr;
CCvarCheckButton *m_pNoViewModel = nullptr;

int m_iNewItemIdx = 0;

Expand Down

0 comments on commit c5ad82b

Please sign in to comment.