Skip to content

Commit

Permalink
Update hud callback for spt_hud_velocity
Browse files Browse the repository at this point in the history
  • Loading branch information
UncraftedName committed Sep 27, 2024
1 parent aa1ea30 commit 0701bf8
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion spt/features/playerio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -997,7 +997,16 @@ void PlayerIOFeature::LoadFeature()
y_spt_hud_velocity);

if (hudEnabled)
SptImGui::RegisterHudCvarCheckbox(y_spt_hud_velocity);
{
SptImGui::RegisterHudCvarCallback(
y_spt_hud_velocity,
[](ConVar& var)
{
const char* opts[] = {"Disabled", "xyz & xy vel", "xy vel", "xyz vel"};
SptImGui::CvarCombo(var, "##combo", opts, ARRAYSIZE(opts));
},
false);
}
}

{
Expand Down

0 comments on commit 0701bf8

Please sign in to comment.