mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 10:17:22 +01:00
[v9] Move GPose check to ClientState (#1378)
This commit is contained in:
parent
fb3d4b5b4c
commit
2c23e6fdb3
3 changed files with 11 additions and 15 deletions
|
|
@ -102,6 +102,9 @@ public sealed class ClientState : IDisposable, IServiceType, IClientState
|
|||
/// <inheritdoc/>
|
||||
public bool IsPvPExcludingDen { get; private set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool IsGPosing => GameMain.IsInGPose();
|
||||
|
||||
/// <summary>
|
||||
/// Gets client state address resolver.
|
||||
/// </summary>
|
||||
|
|
|
|||
|
|
@ -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
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a value indicating whether or not gpose is active.
|
||||
/// </summary>
|
||||
public bool GposeActive
|
||||
{
|
||||
get
|
||||
{
|
||||
var condition = Service<Condition>.GetNullable();
|
||||
if (condition == null)
|
||||
return false;
|
||||
return condition[ConditionFlag.WatchingCutscene];
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a value indicating whether this plugin should modify the game's interface at this time.
|
||||
/// </summary>
|
||||
|
|
@ -448,6 +435,7 @@ public sealed class UiBuilder : IDisposable
|
|||
{
|
||||
this.hitchDetector.Start();
|
||||
|
||||
var clientState = Service<ClientState>.Get();
|
||||
var configuration = Service<DalamudConfiguration>.Get();
|
||||
var gameGui = Service<GameGui>.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)
|
||||
|
|
|
|||
|
|
@ -73,4 +73,9 @@ public interface IClientState
|
|||
/// Gets a value indicating whether or not the user is playing PvP, excluding the Wolves' Den.
|
||||
/// </summary>
|
||||
public bool IsPvPExcludingDen { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets a value indicating whether the client is currently in Group Pose (GPose) mode.
|
||||
/// </summary>
|
||||
public bool IsGPosing { get; }
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue