diff --git a/Interface/GeneralElements/HUDOptionsConfig.cs b/Interface/GeneralElements/HUDOptionsConfig.cs index 6eb5a18..3a86b23 100644 --- a/Interface/GeneralElements/HUDOptionsConfig.cs +++ b/Interface/GeneralElements/HUDOptionsConfig.cs @@ -70,6 +70,12 @@ namespace HSUI.Interface.GeneralElements [Order(50)] public bool HideDefaultPulltimer = false; + [Checkbox("Show HUD during dialogue and interaction", help = + "When enabled, HSUI stays visible (including hotbars and other elements) when talking to NPCs or interacting with objects.\n" + + "When disabled, only the castbar is shown during dialogue and interaction (after a short delay), matching the game's default behavior.")] + [Order(55)] + public bool ShowHudDuringDialogue = true; + [Checkbox("Use Regional Number Format", help = "When enabled, HSUI will use your system's regional format settings when showing numbers.\nWhen disabled, HSUI will use English number formatting instead.", separator = true)] [Order(60)] public bool UseRegionalNumberFormats = true; diff --git a/Interface/HudManager.cs b/Interface/HudManager.cs index e75ff4d..417649c 100644 --- a/Interface/HudManager.cs +++ b/Interface/HudManager.cs @@ -557,6 +557,15 @@ namespace HSUI.Interface return false; } + // When "Show HUD during dialogue" is on, keep HSUI visible during NPC dialogue and object interaction + // even if the game hides the parameter bar + var hudOptions = ConfigurationManager.Instance?.GetConfigObject(); + if (hudOptions?.ShowHudDuringDialogue == true && + (Plugin.Condition[ConditionFlag.OccupiedInQuestEvent] || Plugin.Condition[ConditionFlag.OccupiedInEvent])) + { + return true; + } + AtkUnitBase* parameterWidget = (AtkUnitBase*)Plugin.GameGui.GetAddonByName("_ParameterWidget", 1).Address; AtkUnitBase* fadeMiddleWidget = (AtkUnitBase*)Plugin.GameGui.GetAddonByName("FadeMiddle", 1).Address; @@ -568,6 +577,10 @@ namespace HSUI.Interface protected bool ShouldOnlyShowCastbar() { + var hudOptions = ConfigurationManager.Instance?.GetConfigObject(); + if (hudOptions?.ShowHudDuringDialogue == true) + return false; + // when in quest dialogs and events, hide everything except castbars // this includes talking to npcs or interacting with quest related stuff if (Plugin.Condition[ConditionFlag.OccupiedInQuestEvent] ||