diff --git a/Dalamud/Game/ClientState/ClientState.cs b/Dalamud/Game/ClientState/ClientState.cs
index fed0ec3c4..6817523af 100644
--- a/Dalamud/Game/ClientState/ClientState.cs
+++ b/Dalamud/Game/ClientState/ClientState.cs
@@ -102,6 +102,9 @@ public sealed class ClientState : IDisposable, IServiceType, IClientState
///
public bool IsPvPExcludingDen { get; private set; }
+ ///
+ public bool IsGPosing => GameMain.IsInGPose();
+
///
/// Gets client state address resolver.
///
diff --git a/Dalamud/Interface/UiBuilder.cs b/Dalamud/Interface/UiBuilder.cs
index b440a0705..95ee28f56 100644
--- a/Dalamud/Interface/UiBuilder.cs
+++ b/Dalamud/Interface/UiBuilder.cs
@@ -5,6 +5,7 @@ using System.Threading.Tasks;
using Dalamud.Configuration.Internal;
using Dalamud.Game;
+using Dalamud.Game.ClientState;
using Dalamud.Game.ClientState.Conditions;
using Dalamud.Game.Gui;
using Dalamud.Interface.GameFonts;
@@ -179,20 +180,6 @@ public sealed class UiBuilder : IDisposable
}
}
- ///
- /// Gets a value indicating whether or not gpose is active.
- ///
- public bool GposeActive
- {
- get
- {
- var condition = Service.GetNullable();
- if (condition == null)
- return false;
- return condition[ConditionFlag.WatchingCutscene];
- }
- }
-
///
/// Gets a value indicating whether this plugin should modify the game's interface at this time.
///
@@ -448,6 +435,7 @@ public sealed class UiBuilder : IDisposable
{
this.hitchDetector.Start();
+ var clientState = Service.Get();
var configuration = Service.Get();
var gameGui = Service.GetNullable();
if (gameGui == null)
@@ -457,7 +445,7 @@ public sealed class UiBuilder : IDisposable
!(this.DisableUserUiHide || this.DisableAutomaticUiHide)) ||
(this.CutsceneActive && configuration.ToggleUiHideDuringCutscenes &&
!(this.DisableCutsceneUiHide || this.DisableAutomaticUiHide)) ||
- (this.GposeActive && configuration.ToggleUiHideDuringGpose &&
+ (clientState.IsGPosing && configuration.ToggleUiHideDuringGpose &&
!(this.DisableGposeUiHide || this.DisableAutomaticUiHide)))
{
if (!this.lastFrameUiHideState)
diff --git a/Dalamud/Plugin/Services/IClientState.cs b/Dalamud/Plugin/Services/IClientState.cs
index d66db9cc9..881cad841 100644
--- a/Dalamud/Plugin/Services/IClientState.cs
+++ b/Dalamud/Plugin/Services/IClientState.cs
@@ -73,4 +73,9 @@ public interface IClientState
/// Gets a value indicating whether or not the user is playing PvP, excluding the Wolves' Den.
///
public bool IsPvPExcludingDen { get; }
+
+ ///
+ /// Gets a value indicating whether the client is currently in Group Pose (GPose) mode.
+ ///
+ public bool IsGPosing { get; }
}