mirror of
https://github.com/shavitush/bhoptimer.git
synced 2025-12-06 18:08:26 +00:00
option whether to draw !keys in the center or menu for csgo
This commit is contained in:
parent
e1e404714b
commit
f474a944ae
@ -58,6 +58,7 @@
|
||||
#define HUD2_VELOCITYDIFFERENCE (1 << 13)
|
||||
#define HUD2_USPSILENCER (1 << 14) // spawns usps with a silencer on
|
||||
#define HUD2_GLOCKBURST (1 << 15) // spawns glocks with burst
|
||||
#define HUD2_CENTERKEYS (1 << 16) // CSGO option to toggle whether !keys is shown as center-text or in that panel thing.
|
||||
|
||||
#define HUD_DEFAULT (HUD_MASTER|HUD_CENTER|HUD_ZONEHUD|HUD_OBSERVE|HUD_TOPLEFT|HUD_SYNC|HUD_TIMELEFT|HUD_2DVEL|HUD_SPECTATORS)
|
||||
#define HUD_DEFAULT2 (HUD2_PERFS)
|
||||
|
||||
@ -764,6 +764,13 @@ Action ShowHUDMenu(int client, int item)
|
||||
menu.AddItem(sInfo, sHudItem);
|
||||
}
|
||||
|
||||
if (gEV_Type == Engine_CSGO)
|
||||
{
|
||||
FormatEx(sInfo, 16, "@%d", HUD2_CENTERKEYS);
|
||||
FormatEx(sHudItem, 64, "%T", "HudCenterKeys", client);
|
||||
menu.AddItem(sInfo, sHudItem);
|
||||
}
|
||||
|
||||
menu.ExitButton = true;
|
||||
menu.DisplayAt(client, item, MENU_TIME_FOREVER);
|
||||
|
||||
@ -1077,7 +1084,13 @@ void TriggerHUDUpdate(int client, bool keysonly = false) // keysonly because CS:
|
||||
UpdateTopLeftHUD(client, true);
|
||||
}
|
||||
|
||||
UpdateCenterKeys(client);
|
||||
bool draw_keys = HUD1Enabled(gI_HUDSettings[client], HUD_KEYOVERLAY);
|
||||
bool center_keys = HUD2Enabled(gI_HUD2Settings[client], HUD2_CENTERKEYS);
|
||||
|
||||
if (draw_keys && center_keys)
|
||||
{
|
||||
UpdateCenterKeys(client);
|
||||
}
|
||||
|
||||
if(IsSource2013(gEV_Type))
|
||||
{
|
||||
@ -1086,7 +1099,7 @@ void TriggerHUDUpdate(int client, bool keysonly = false) // keysonly because CS:
|
||||
UpdateKeyHint(client);
|
||||
}
|
||||
}
|
||||
else if ((gI_HUDSettings[client] & HUD_SPECTATORS) > 0
|
||||
else if (((gI_HUDSettings[client] & HUD_SPECTATORS) > 0 || (draw_keys && !center_keys))
|
||||
&& (!gB_Zones || !Shavit_IsClientCreatingZone(client))
|
||||
&& (GetClientMenu(client, null) == MenuSource_None || GetClientMenu(client, null) == MenuSource_RawPanel)
|
||||
)
|
||||
@ -1094,8 +1107,11 @@ void TriggerHUDUpdate(int client, bool keysonly = false) // keysonly because CS:
|
||||
bool bShouldDraw = false;
|
||||
Panel pHUD = new Panel();
|
||||
|
||||
//UpdateKeyOverlay(client, pHUD, bShouldDraw);
|
||||
//pHUD.DrawItem("", ITEMDRAW_RAWLINE);
|
||||
if (!center_keys)
|
||||
{
|
||||
UpdateKeyOverlay(client, pHUD, bShouldDraw);
|
||||
pHUD.DrawItem("", ITEMDRAW_RAWLINE);
|
||||
}
|
||||
|
||||
UpdateSpectatorList(client, pHUD, bShouldDraw);
|
||||
|
||||
|
||||
@ -100,6 +100,10 @@
|
||||
"#format" "{1:d}"
|
||||
"en" "(Speed Limit: {1})"
|
||||
}
|
||||
"HudCenterKeys"
|
||||
{
|
||||
"en" "!keys in the center"
|
||||
}
|
||||
// ---------- Menus ---------- //
|
||||
"HUDMenuTitle"
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user