diff --git a/gamedir/ui/resource/language/bugfixedhl_english.txt b/gamedir/ui/resource/language/bugfixedhl_english.txt index 02b51b2e..7ff395c3 100644 Binary files a/gamedir/ui/resource/language/bugfixedhl_english.txt and b/gamedir/ui/resource/language/bugfixedhl_english.txt differ diff --git a/gamedir/ui/resource/language/bugfixedhl_russian.txt b/gamedir/ui/resource/language/bugfixedhl_russian.txt index c76a0b2b..8f270b37 100644 Binary files a/gamedir/ui/resource/language/bugfixedhl_russian.txt and b/gamedir/ui/resource/language/bugfixedhl_russian.txt differ diff --git a/gamedir/ui/resource/options/HudSubOptions.res b/gamedir/ui/resource/options/HudSubOptions.res index d7697939..82628bd1 100644 --- a/gamedir/ui/resource/options/HudSubOptions.res +++ b/gamedir/ui/resource/options/HudSubOptions.res @@ -283,7 +283,7 @@ { "ControlName" "CCvarCheckButton" "fieldName" "SpeedCrossCheckbox" - "xpos" "194" + "xpos" "230" "ypos" "208" "wide" "230" "tall" "24" @@ -339,7 +339,7 @@ { "ControlName" "CCvarCheckButton" "fieldName" "JumpSpeedCrossCheckbox" - "xpos" "194" + "xpos" "230" "ypos" "232" "wide" "230" "tall" "24" @@ -367,9 +367,9 @@ { "ControlName" "CCvarCheckButton" "fieldName" "DeathnoticeCheckbox" - "xpos" "264" - "ypos" "136" - "wide" "238" + "xpos" "230" + "ypos" "184" + "wide" "192" "tall" "24" "autoResize" "0" "pinCorner" "0" @@ -391,6 +391,50 @@ "useproportionalinsets" "0" "Default" "0" } + "TimerBox" + { + "ControlName" "CCVarComboBox" + "fieldName" "TimerBox" + "xpos" "274" + "ypos" "92" + "wide" "192" + "tall" "24" + "autoResize" "0" + "pinCorner" "0" + "RoundedCorners" "15" + "pin_corner_to_sibling" "0" + "pin_to_sibling_corner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "textHidden" "0" + "editable" "0" + "maxchars" "-1" + "NumericInputOnly" "0" + "unicode" "0" + } + "ScaleBox" + { + "ControlName" "CCVarComboBox" + "fieldName" "ScaleBox" + "xpos" "274" + "ypos" "145" + "wide" "192" + "tall" "24" + "autoResize" "0" + "pinCorner" "0" + "RoundedCorners" "15" + "pin_corner_to_sibling" "0" + "pin_to_sibling_corner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "textHidden" "0" + "editable" "0" + "maxchars" "-1" + "NumericInputOnly" "0" + "unicode" "0" + } "TimerLabel" { "ControlName" "Label" @@ -418,13 +462,13 @@ "autowidetocontents" "0" "useproportionalinsets" "0" } - "TimerBox" + "Label1" { - "ControlName" "ComboBox" - "fieldName" "TimerBox" - "xpos" "274" - "ypos" "92" - "wide" "192" + "ControlName" "Label" + "fieldName" "Label1" + "xpos" "28" + "ypos" "256" + "wide" "280" "tall" "24" "autoResize" "0" "pinCorner" "0" @@ -434,19 +478,24 @@ "visible" "1" "enabled" "1" "tabPosition" "0" - "textHidden" "0" - "editable" "0" - "maxchars" "-1" - "NumericInputOnly" "0" - "unicode" "0" + "labelText" "#BHL_AdvOptions_HUD_RenderMsg" + "textAlignment" "west" + "dulltext" "1" + "brighttext" "0" + "wrap" "0" + "centerwrap" "0" + "textinsetx" "0" + "textinsety" "0" + "autowidetocontents" "0" + "useproportionalinsets" "0" } - "Label1" + "Label2" { "ControlName" "Label" - "fieldName" "Label1" - "xpos" "28" - "ypos" "256" - "wide" "280" + "fieldName" "Label2" + "xpos" "276" + "ypos" "117" + "wide" "214" "tall" "24" "autoResize" "0" "pinCorner" "0" @@ -456,9 +505,9 @@ "visible" "1" "enabled" "1" "tabPosition" "0" - "labelText" "#BHL_AdvOptions_HUD_RenderMsg" + "labelText" "#BHL_AdvOptions_Hud_Scale" "textAlignment" "west" - "dulltext" "1" + "dulltext" "0" "brighttext" "0" "wrap" "0" "centerwrap" "0" @@ -471,8 +520,8 @@ { "ControlName" "BuildModeDialog" "fieldName" "BuildModeDialog" - "xpos" "1146" - "ypos" "308" + "xpos" "1076" + "ypos" "226" "wide" "300" "tall" "420" "autoResize" "0" diff --git a/src/game/client/gameui/options/options_hud.cpp b/src/game/client/gameui/options/options_hud.cpp index efa5455a..0cec1ad0 100644 --- a/src/game/client/gameui/options/options_hud.cpp +++ b/src/game/client/gameui/options/options_hud.cpp @@ -38,13 +38,19 @@ CHudSubOptions::CHudSubOptions(vgui2::Panel *parent) m_pDeathnoticeVGui = new CCvarCheckButton(this, "DeathnoticeCheckbox", "#BHL_AdvOptions_HUD_Deathnotice", "hud_deathnotice_vgui"); - m_pTimerLabel = new vgui2::Label(this, "TimerLabel", "#BHL_AdvOptions_Hud_Timer"); m_pTimerBox = new CCVarComboBox(this, "TimerBox", "hud_timer"); m_pTimerBox->AddItem("#BHL_AdvOptions_Hud_Timer0", "0"); m_pTimerBox->AddItem("#BHL_AdvOptions_Hud_Timer1", "1"); m_pTimerBox->AddItem("#BHL_AdvOptions_Hud_Timer2", "2"); m_pTimerBox->AddItem("#BHL_AdvOptions_Hud_Timer3", "3"); + m_pScaleBox = new CCVarComboBox(this, "ScaleBox", "hud_scale"); + m_pScaleBox->AddItem("#BHL_AdvOptions_Hud_ScaleAuto", "0"); + m_pScaleBox->AddItem("50%", "1"); + m_pScaleBox->AddItem("100%", "2"); + m_pScaleBox->AddItem("200%", "3"); + m_pScaleBox->AddItem("400%", "5"); + LoadControlSettings(VGUI2_ROOT_DIR "resource/options/HudSubOptions.res"); m_pOpacityLabel->MoveToFront(); // Obscured by the slider @@ -56,29 +62,6 @@ CHudSubOptions::CHudSubOptions(vgui2::Panel *parent) } } -void CHudSubOptions::PerformLayout() -{ - BaseClass::PerformLayout(); - - int x, speedY, jumpY; - int wide, tall; - - // Resize hud_speedometer - m_pSpeedCheckbox->GetPos(x, speedY); - m_pSpeedCheckbox->GetContentSize(wide, tall); - m_pSpeedCheckbox->SetWide(wide); - int xpos = x + wide; - - // Resize hud_jumpspeed - m_pJumpSpeedCheckbox->GetPos(x, jumpY); - m_pJumpSpeedCheckbox->GetContentSize(wide, tall); - m_pJumpSpeedCheckbox->SetWide(wide); - xpos = max(xpos, x + wide); - - m_pSpeedCrossCheckbox->SetPos(xpos + 4, speedY); - m_pJumpSpeedCrossCheckbox->SetPos(xpos + 4, jumpY); -} - void CHudSubOptions::OnResetData() { if (m_pRenderCheckbox->IsEnabled()) @@ -103,6 +86,7 @@ void CHudSubOptions::OnResetData() m_pDeathnoticeVGui->SetSelected(false); m_pTimerBox->ResetData(); + m_pScaleBox->ResetData(); } void CHudSubOptions::OnApplyChanges() @@ -125,6 +109,7 @@ void CHudSubOptions::OnApplyChanges() m_pDeathnoticeVGui->ApplyChanges(); m_pTimerBox->ApplyChanges(); + m_pScaleBox->ApplyChanges(); } void CHudSubOptions::OnSliderMoved(KeyValues *kv) diff --git a/src/game/client/gameui/options/options_hud.h b/src/game/client/gameui/options/options_hud.h index a2435b61..0e67a770 100644 --- a/src/game/client/gameui/options/options_hud.h +++ b/src/game/client/gameui/options/options_hud.h @@ -19,7 +19,6 @@ class CHudSubOptions : public vgui2::PropertyPage public: CHudSubOptions(vgui2::Panel *parent); - void PerformLayout() override; void OnResetData() override; void OnApplyChanges() override; @@ -43,8 +42,8 @@ class CHudSubOptions : public vgui2::PropertyPage CCvarCheckButton *m_pDeathnoticeVGui = nullptr; - vgui2::Label *m_pTimerLabel = nullptr; CCVarComboBox *m_pTimerBox = nullptr; + CCVarComboBox *m_pScaleBox = nullptr; MESSAGE_FUNC_PARAMS(OnSliderMoved, "SliderMoved", kv); MESSAGE_FUNC_PARAMS(OnCvarTextChanged, "CvarTextChanged", kv);