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
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2823,6 +2823,8 @@ if(CLIENT)
components/tclient/tclient.h
components/tclient/trails.cpp
components/tclient/trails.h
components/tclient/hud_watch.cpp
components/tclient/hud_watch.h
components/bestclient/3d_particles.cpp
components/bestclient/3d_particles.h
components/bestclient/admin_panel.cpp
Expand Down
4 changes: 4 additions & 0 deletions src/engine/shared/config_variables_tclient.h
Original file line number Diff line number Diff line change
Expand Up @@ -290,4 +290,8 @@ MACRO_CONFIG_INT(TcUiCompactList, tc_ui_compact_list, 0, 0, 1, CFGFLAG_CLIENT |
// Dummy Info
MACRO_CONFIG_INT(TcShowhudDummyPosition, tc_showhud_dummy_position, 0, 0, 1, CFGFLAG_CLIENT | CFGFLAG_SAVE, "Show ingame HUD (Dummy Position)")
MACRO_CONFIG_INT(TcShowhudDummySpeed, tc_showhud_dummy_speed, 0, 0, 1, CFGFLAG_CLIENT | CFGFLAG_SAVE, "Show ingame HUD (Dummy Speed)")

// Hud Watch - config variable watcher displayed on screen
MACRO_CONFIG_INT(TcHudWatchEnable, tc_hud_watch_enable, 1, 0, 1, CFGFLAG_CLIENT | CFGFLAG_SAVE, "Enable HUD watch overlay")
MACRO_CONFIG_STR(TcHudWatchData, tc_hud_watch_data, 2048, "", CFGFLAG_CLIENT | CFGFLAG_SAVE, "Serialized HUD watch data (var|label|hexcolor;...)")
MACRO_CONFIG_INT(TcShowhudDummyAngle, tc_showhud_dummy_angle, 0, 0, 1, CFGFLAG_CLIENT | CFGFLAG_SAVE, "Show ingame HUD (Dummy Aim Angle)")
8 changes: 7 additions & 1 deletion src/game/client/components/bestclient/hud_editor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,8 @@ namespace
Module == HudLayout::MODULE_FINISH_PREDICTION ||
Module == HudLayout::MODULE_VOICE_TALKERS ||
Module == HudLayout::MODULE_VOICE_STATUS ||
Module == HudLayout::MODULE_MUSIC_PLAYER;
Module == HudLayout::MODULE_MUSIC_PLAYER ||
Module == HudLayout::MODULE_HUD_WATCH;
}

bool PointInRect(vec2 Point, const CUIRect &Rect)
Expand Down Expand Up @@ -572,6 +573,10 @@ CHudEditor::SModuleVisual CHudEditor::GetModuleVisual(HudLayout::EModule Module)
Visual.m_Rect = GameClient()->m_VoiceChat.GetHudMuteStatusIndicatorRect(Width, Height, true);
Visual.m_Rounding = 2.3f;
break;
case HudLayout::MODULE_HUD_WATCH:
Visual.m_Rect = GameClient()->m_HudWatch.GetHudEditorRect();
Visual.m_Rounding = 4.0f;
break;
default:
Visual.m_Rect = GetFallbackModuleRect(Module);
Visual.m_Rounding = 4.0f;
Expand Down Expand Up @@ -619,6 +624,7 @@ void CHudEditor::CollectModuleVisuals(SModuleVisual *pOut, int &Count) const
AddModule(HudLayout::MODULE_MUSIC_PLAYER);
AddModule(HudLayout::MODULE_VOICE_TALKERS);
AddModule(HudLayout::MODULE_VOICE_STATUS);
AddModule(HudLayout::MODULE_HUD_WATCH);
}

HudLayout::EModule CHudEditor::HitTestModule(vec2 MousePos) const
Expand Down
2 changes: 2 additions & 0 deletions src/game/client/components/hud_layout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ namespace HudLayout
// when the keyboard preset changes.
{84.5f, 152.0f, 100, 0, true, false, 0x66000000U}, // KEYSTROKES_MOUSE
{484.0f, 172.0f, 100, 0, true, true, 0x66000000U}, // DUMMY_ACTIONS
{5.0f, 60.0f, 100, 0, true, false, 0x66000000U}, // HUD_WATCH
};

static const char *gs_apModuleNames[MODULE_COUNT] = {
Expand All @@ -73,6 +74,7 @@ namespace HudLayout
"Keyboard",
"Mouse",
"Dummy Actions",
"Config Watch",
};

static SModuleLayout gs_aRuntimeModuleLayouts[MODULE_COUNT];
Expand Down
1 change: 1 addition & 0 deletions src/game/client/components/hud_layout.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ namespace HudLayout
MODULE_KEYSTROKES_KEYBOARD,
MODULE_KEYSTROKES_MOUSE,
MODULE_DUMMY_ACTIONS,
MODULE_HUD_WATCH,
MODULE_COUNT,
};

Expand Down
Loading