Skip to content
Open
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
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
/build_*
/_build
/_build_*

compile_commands.json
.cache
# macOS garbage
.DS_Store
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.
56 changes: 56 additions & 0 deletions gamedir/ui/resource/options/ModelSubOptions.res
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,62 @@
"autowidetocontents" "0"
"useproportionalinsets" "0"
"Default" "0"
}
"QuakeGuns"
{
"ControlName" "CCvarCheckButton"
"fieldName" "QuakeGuns"
"xpos" "193"
"ypos" "284"
"wide" "255"
"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_Enable_QuakeGuns"
"textAlignment" "west"
"dulltext" "0"
"brighttext" "0"
"wrap" "0"
"centerwrap" "0"
"textinsetx" "6"
"textinsety" "0"
"autowidetocontents" "0"
"useproportionalinsets" "0"
"Default" "0"
}
"WeaponSway"
{
"ControlName" "CCvarCheckButton"
"fieldName" "WeaponSway"
"xpos" "307"
"ypos" "166"
"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"
"labelText" "#BHL_Enable_WeaponSway"
"textAlignment" "west"
"dulltext" "0"
"brighttext" "0"
"wrap" "0"
"centerwrap" "0"
"textinsetx" "6"
"textinsety" "0"
"autowidetocontents" "0"
"useproportionalinsets" "0"
"Default" "0"
}
"NoShells"
{
Expand Down
8 changes: 7 additions & 1 deletion src/game/client/gameui/options/options_models.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@
#include <vgui_controls/Button.h>
#include <vgui_controls/ListPanel.h>
#include <vgui_controls/TextEntry.h>
#include <vgui_controls/Slider.h>
#include <KeyValues.h>
#include "client_vgui.h"
#include "cvar_check_button.h"
#include "cvar_text_entry.h"
#include "options_models.h"
#include "gameui/options/cvar_slider.h"
#include "hud.h"
#include "cl_util.h"

Expand All @@ -22,12 +24,14 @@ CModelSubOptions::CModelSubOptions(vgui2::Panel *parent)
m_pEnemyModels->AddColumnHeader(0, "ModelName", "#BHL_AdvOptions_Models_ModelName", 1024, 0, 1024, vgui2::ListPanel::COLUMN_RESIZEWITHWINDOW);
m_pEnemyModels->SetColumnSortable(0, false);
m_pEnemyModels->SetIgnoreDoubleClick(true);

m_pQuakeGuns = new CCvarCheckButton(this, "QuakeGuns", "#BHL_Enable_QuakeGuns", "cl_quakeguns_enable");
m_pWeaponSway = new CCvarCheckButton(this, "WeaponSway", "#BHL_Enable_WeaponSway", "cl_weaponlag_enable");
m_pAddEnemyModel = new vgui2::Button(this, "AddEnemyModel", "#BHL_AdvOptions_Models_Add", this, "AddEnemyModel");
m_pRemoveEnemyModel = new vgui2::Button(this, "RemoveEnemyModel", "#BHL_AdvOptions_Models_Remove", this, "RemoveEnemyModel");
m_pRemoveAllEnemyModels = new vgui2::Button(this, "RemoveAllEnemyModels", "#BHL_AdvOptions_Models_RemoveAll", this, "RemoveAllEnemyModels");
m_pNewEnemyModelName = new vgui2::TextEntry(this, "NewEnemyModelName");


m_pTeamModel = new CCvarTextEntry(this, "TeamModel", "cl_forceteammatesmodels");
m_pEnemyColors = new CCvarTextEntry(this, "EnemyColors", "cl_forceenemycolors");
m_pTeamColors = new CCvarTextEntry(this, "TeamColors", "cl_forceteammatescolors");
Expand Down Expand Up @@ -113,6 +117,8 @@ void CModelSubOptions::OnApplyChanges()
m_pAngledBob->ApplyChanges();
m_pNoShells->ApplyChanges();
m_pNoViewModel->ApplyChanges();
m_pWeaponSway->ApplyChanges();
m_pQuakeGuns->ApplyChanges();
}

void CModelSubOptions::ParseEnemyModels()
Expand Down
5 changes: 4 additions & 1 deletion src/game/client/gameui/options/options_models.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#ifndef OPTIONS_MODELS_H
#define OPTIONS_MODELS_H
#include "gameui/options/cvar_slider.h"
#include <vgui_controls/PropertyPage.h>

namespace vgui2
Expand All @@ -11,6 +12,7 @@ class TextEntry;

class CCvarCheckButton;
class CCvarTextEntry;
class CCvarSlider;

class CModelSubOptions : public vgui2::PropertyPage
{
Expand Down Expand Up @@ -38,7 +40,8 @@ class CModelSubOptions : public vgui2::PropertyPage
CCvarCheckButton *m_pAngledBob = nullptr;
CCvarCheckButton *m_pNoShells = nullptr;
CCvarCheckButton *m_pNoViewModel = nullptr;

CCvarCheckButton *m_pQuakeGuns = nullptr;
CCvarCheckButton *m_pWeaponSway = nullptr;
int m_iNewItemIdx = 0;

void ParseEnemyModels();
Expand Down
Loading