v1.0.2.0: Restore Hotbar Layout, fix config right-click menu, hotbar fallback

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-01-31 02:29:13 -05:00
parent c63c054c5b
commit 6e0eb32a24
11 changed files with 101 additions and 16 deletions
+24
View File
@@ -263,6 +263,30 @@ namespace HSUI.Interface
SetGameHudElementsHidden(hashesToHide.ToArray(), false);
}
private static bool AnyHotbarEnabled()
{
var cfg = ConfigurationManager.Instance;
if (cfg == null) return true;
var bars = new HotbarBarConfig?[]
{
cfg.GetConfigObject<Hotbar1BarConfig>(),
cfg.GetConfigObject<Hotbar2BarConfig>(),
cfg.GetConfigObject<Hotbar3BarConfig>(),
cfg.GetConfigObject<Hotbar4BarConfig>(),
cfg.GetConfigObject<Hotbar5BarConfig>(),
cfg.GetConfigObject<Hotbar6BarConfig>(),
cfg.GetConfigObject<Hotbar7BarConfig>(),
cfg.GetConfigObject<Hotbar8BarConfig>(),
cfg.GetConfigObject<Hotbar9BarConfig>(),
cfg.GetConfigObject<Hotbar10BarConfig>()
};
foreach (var bar in bars)
{
if (bar?.Enabled == true) return true;
}
return false;
}
/// <summary>Visibility (ByteValue2) of game HUD elements before we hid them. Restored on disable/unload.</summary>
private readonly Dictionary<uint, byte> _gameHudVisibilityBeforeHide = new();