v1.2.3.b3 - HUD auto-hide

This commit is contained in:
Juzlus 2026-08-02 00:09:46 +02:00
parent 8bb69c1ea1
commit 20f1ba212a
10 changed files with 31 additions and 10 deletions

View file

@ -60,6 +60,16 @@ public class WasdManager : IWasdMenuManager
menuPlayer?.UpdateActiveMenu(list);
}
public bool SetMenuPaused(CCSPlayerController? player, bool pause)
{
if (TryGetPlayer(player, out var menuPlayer) && menuPlayer != null)
{
menuPlayer.Paused = pause;
return true;
}
return false;
}
private static bool TryGetPlayer(CCSPlayerController? player, out WasdMenuPlayer? menuPlayer)
{
menuPlayer = null!;

View file

@ -15,6 +15,7 @@ public class WasdMenuPlayer
public string CenterHtml = "";
public int VisibleOptions = 3;
public PlayerButtons Buttons { get; set; }
public bool Paused = false;
public int scrollIndex = 0;
public int maxLength = 21;
@ -128,6 +129,8 @@ public class WasdMenuPlayer
string endControl = "";
LinkedListNode<IWasdMenuOption>? option = MenuStart;
builder.AppendLine("<jRS/>");
if (!string.IsNullOrEmpty(option?.Value?.Parent?.Title))
builder.AppendLine(option.Value.Parent?.Title ?? "");