Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion gamedir/ui/resource/language/bugfixedhl_english.utf8.txt
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,12 @@
"BHL_AdvOptions_HUD_Color2_Title" "HUD HP/AP/Ammo (Medium) color"

"BHL_AdvOptions_HUD_Color3" "HP/AP/Ammo (Low)"
"BHL_AdvOptions_HUD_Color3_Title" "HUD HP/AP/Ammo (Medium) color"
"BHL_AdvOptions_HUD_Color3_Title" "HUD HP/AP/Ammo (Low) color"

"BHL_AdvOptions_HUD_Color4" "HP/AP/Ammo (Very low)"
"BHL_AdvOptions_HUD_Color4_Title" "HUD HP/AP/Ammo (Very low) color"

"BHL_AdvOptions_HUD_ColorOverride" "Color HUD numbers by amount (HP/AP/Ammo)"

"BHL_AdvOptions_HUD_Render" "Enhanced sprite rendering *"
"BHL_AdvOptions_HUD_Dim" "Dim HUD when inactive"
Expand All @@ -96,6 +101,7 @@
"BHL_AdvOptions_HUD_JumpSpeedCross" "Jump speed under crosshair"

"BHL_AdvOptions_HUD_Deathnotice" "VGUI2 Deathnotice *"
"BHL_AdvOptions_HUD_CustomHud" "VGUI2 Custom HUD (HP/AP/Ammo) *"

"BHL_AdvOptions_HUD_RenderMsg" "* Requires hardware rendering mode"

Expand Down
44 changes: 36 additions & 8 deletions gamedir/ui/resource/options/HudSubOptions.res
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"fieldName" "OpacityLabel"
"xpos" "38"
"ypos" "15"
"wide" "180"
"wide" "150"
"tall" "24"
"autoResize" "0"
"pinCorner" "0"
Expand All @@ -48,7 +48,7 @@
{
"ControlName" "CCvarTextEntry"
"fieldName" "OpacityValue"
"xpos" "292"
"xpos" "212"
"ypos" "30"
"wide" "48"
"tall" "24"
Expand All @@ -72,7 +72,7 @@
"fieldName" "OpacitySlider"
"xpos" "38"
"ypos" "32"
"wide" "252"
"wide" "172"
"tall" "24"
"autoResize" "0"
"pinCorner" "0"
Expand Down Expand Up @@ -363,12 +363,40 @@
"useproportionalinsets" "0"
"Default" "0"
}
"CustomHudCheckbox"
{
"ControlName" "CCvarCheckButton"
"fieldName" "CustomHudCheckBox"
"xpos" "230"
"ypos" "184"
"wide" "240"
"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_HUD_CustomHud"
"textAlignment" "west"
"dulltext" "0"
"brighttext" "0"
"wrap" "0"
"centerwrap" "0"
"textinsetx" "6"
"textinsety" "0"
"autowidetocontents" "0"
"useproportionalinsets" "0"
"Default" "0"
}
"DeathnoticeCheckbox"
{
"ControlName" "CCvarCheckButton"
"fieldName" "DeathnoticeCheckbox"
"xpos" "230"
"ypos" "184"
"ypos" "160"
"wide" "192"
"tall" "24"
"autoResize" "0"
Expand Down Expand Up @@ -396,7 +424,7 @@
"ControlName" "CCVarComboBox"
"fieldName" "TimerBox"
"xpos" "274"
"ypos" "92"
"ypos" "45"
"wide" "192"
"tall" "24"
"autoResize" "0"
Expand All @@ -418,7 +446,7 @@
"ControlName" "CCVarComboBox"
"fieldName" "ScaleBox"
"xpos" "274"
"ypos" "145"
"ypos" "100"
"wide" "192"
"tall" "24"
"autoResize" "0"
Expand All @@ -440,7 +468,7 @@
"ControlName" "Label"
"fieldName" "TimerLabel"
"xpos" "276"
"ypos" "64"
"ypos" "15"
"wide" "214"
"tall" "24"
"autoResize" "0"
Expand Down Expand Up @@ -494,7 +522,7 @@
"ControlName" "Label"
"fieldName" "Label2"
"xpos" "276"
"ypos" "117"
"ypos" "72"
"wide" "214"
"tall" "24"
"autoResize" "0"
Expand Down
72 changes: 72 additions & 0 deletions gamedir/ui/resource/options/HudSubOptionsColors.res
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,78 @@
"enabled" "1"
"tabPosition" "0"
}
"Color4Label"
{
"ControlName" "Label"
"fieldName" "Color4Label"
"xpos" "12"
"ypos" "128"
"wide" "150"
"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_HUD_Color4"
"textAlignment" "west"
"dulltext" "0"
"brighttext" "0"
"wrap" "0"
"centerwrap" "0"
"textinsetx" "0"
"textinsety" "0"
"autowidetocontents" "0"
"useproportionalinsets" "0"
}
"Color4Value"
{
"ControlName" "CCvarColor"
"fieldName" "Color4Value"
"xpos" "170"
"ypos" "128"
"wide" "128"
"tall" "24"
"autoResize" "0"
"pinCorner" "0"
"RoundedCorners" "15"
"pin_corner_to_sibling" "0"
"pin_to_sibling_corner" "0"
"visible" "1"
"enabled" "1"
"tabPosition" "0"
}
"ColorOverrideCheckbox"
{
"ControlName" "CCvarCheckButton"
"fieldName" "ColorOverrideCheckbox"
"xpos" "5"
"ypos" "160"
"wide" "300"
"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_HUD_ColorOverride"
"textAlignment" "west"
"dulltext" "0"
"brighttext" "0"
"wrap" "0"
"centerwrap" "0"
"textinsetx" "6"
"textinsety" "0"
"autowidetocontents" "0"
"useproportionalinsets" "0"
"Default" "0"
}
"BuildModeDialog"
{
"ControlName" "BuildModeDialog"
Expand Down
10 changes: 10 additions & 0 deletions src/game/client/gameui/options/options_hud.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ CHudSubOptions::CHudSubOptions(vgui2::Panel *parent)
m_pJumpSpeedCrossCheckbox = new CCvarCheckButton(this, "JumpSpeedCrossCheckbox", "#BHL_AdvOptions_HUD_JumpSpeedCross", "hud_jumpspeed_below_cross");

m_pDeathnoticeVGui = new CCvarCheckButton(this, "DeathnoticeCheckbox", "#BHL_AdvOptions_HUD_Deathnotice", "hud_deathnotice_vgui");
m_pCustomHudVGui = new CCvarCheckButton(this, "CustomHudCheckbox", "#BHL_AdvOptions_HUD_CustomHud", "hud_custom");

m_pTimerBox = new CCVarComboBox(this, "TimerBox", "hud_timer");
m_pTimerBox->AddItem("#BHL_AdvOptions_Hud_Timer0", "0");
Expand Down Expand Up @@ -67,6 +68,7 @@ CHudSubOptions::CHudSubOptions(vgui2::Panel *parent)
{
m_pRenderCheckbox->SetEnabled(false);
m_pDeathnoticeVGui->SetEnabled(false);
m_pCustomHudVGui->SetEnabled(false);
}
}

Expand All @@ -93,6 +95,11 @@ void CHudSubOptions::OnResetData()
else
m_pDeathnoticeVGui->SetSelected(false);

if (m_pCustomHudVGui->IsEnabled())
m_pCustomHudVGui->ResetData();
else
m_pCustomHudVGui->SetSelected(false);

m_pTimerBox->ResetData();
m_pScaleBox->ResetData();
}
Expand All @@ -116,6 +123,9 @@ void CHudSubOptions::OnApplyChanges()
if (m_pDeathnoticeVGui->IsEnabled())
m_pDeathnoticeVGui->ApplyChanges();

if (m_pCustomHudVGui->IsEnabled())
m_pCustomHudVGui->ApplyChanges();

m_pTimerBox->ApplyChanges();
m_pScaleBox->ApplyChanges();
}
Expand Down
1 change: 1 addition & 0 deletions src/game/client/gameui/options/options_hud.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ class CHudSubOptions : public vgui2::PropertyPage
CCvarCheckButton *m_pJumpSpeedCrossCheckbox = nullptr;

CCvarCheckButton *m_pDeathnoticeVGui = nullptr;
CCvarCheckButton *m_pCustomHudVGui = nullptr;

CCVarComboBox *m_pTimerBox = nullptr;
CCVarComboBox *m_pScaleBox = nullptr;
Expand Down
10 changes: 10 additions & 0 deletions src/game/client/gameui/options/options_hud_colors.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include <vgui_controls/Label.h>
#include "client_vgui.h"
#include "cvar_color.h"
#include "cvar_check_button.h"
#include "options_hud_colors.h"

CHudSubOptionsColors::CHudSubOptionsColors(vgui2::Panel *parent)
Expand All @@ -20,6 +21,11 @@ CHudSubOptionsColors::CHudSubOptionsColors(vgui2::Panel *parent)
m_pColorLabel[3] = new vgui2::Label(this, "Color3Label", "#BHL_AdvOptions_HUD_Color3");
m_pColorValue[3] = new CCvarColor(this, "Color3Value", "hud_color3", "#BHL_AdvOptions_HUD_Color3_Title");

m_pColorLabel[4] = new vgui2::Label(this, "Color4Label", "#BHL_AdvOptions_HUD_Color4");
m_pColorValue[4] = new CCvarColor(this, "Color4Value", "hud_color4", "#BHL_AdvOptions_HUD_Color4_Title");

m_pColorOverride = new CCvarCheckButton(this, "ColorOverrideCheckbox", "#BHL_AdvOptions_HUD_ColorOverride", "hud_color_override", true);

LoadControlSettings(VGUI2_ROOT_DIR "resource/options/HudSubOptionsColors.res");
}

Expand All @@ -29,6 +35,8 @@ void CHudSubOptionsColors::OnResetData()
m_pColorValue[1]->ResetData();
m_pColorValue[2]->ResetData();
m_pColorValue[3]->ResetData();
m_pColorValue[4]->ResetData();
m_pColorOverride->ResetData();
}

void CHudSubOptionsColors::OnApplyChanges()
Expand All @@ -37,4 +45,6 @@ void CHudSubOptionsColors::OnApplyChanges()
m_pColorValue[1]->ApplyChanges();
m_pColorValue[2]->ApplyChanges();
m_pColorValue[3]->ApplyChanges();
m_pColorValue[4]->ApplyChanges();
m_pColorOverride->ApplyChanges();
}
6 changes: 4 additions & 2 deletions src/game/client/gameui/options/options_hud_colors.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#include <vgui_controls/PropertyPage.h>

class CCvarColor;
class CCvarCheckButton;

class CHudSubOptionsColors : public vgui2::PropertyPage
{
Expand All @@ -15,8 +16,9 @@ class CHudSubOptionsColors : public vgui2::PropertyPage
virtual void OnApplyChanges();

private:
vgui2::Label *m_pColorLabel[4];
CCvarColor *m_pColorValue[4];
vgui2::Label *m_pColorLabel[5];
CCvarColor *m_pColorValue[5];
CCvarCheckButton *m_pColorOverride = nullptr;
};

#endif
Loading