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:
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user