mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-02-21 15:27:43 +01:00
feat: make tippy respect UI hiding
This commit is contained in:
parent
6169f28b33
commit
1778ee9d27
1 changed files with 14 additions and 5 deletions
|
|
@ -9,6 +9,7 @@ using System.Numerics;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using System.Windows.Forms.VisualStyles;
|
using System.Windows.Forms.VisualStyles;
|
||||||
|
using Dalamud.Game.ClientState;
|
||||||
using Dalamud.Interface;
|
using Dalamud.Interface;
|
||||||
using ImGuiNET;
|
using ImGuiNET;
|
||||||
using ImGuiScene;
|
using ImGuiScene;
|
||||||
|
|
@ -320,6 +321,15 @@ namespace Dalamud
|
||||||
this.sounds.Play();
|
this.sounds.Play();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private bool CutsceneActive => this.dalamud.ClientState != null &&
|
||||||
|
(this.dalamud.ClientState.Condition[ConditionFlag.OccupiedInCutSceneEvent] ||
|
||||||
|
this.dalamud.ClientState.Condition[ConditionFlag.WatchingCutscene78]);
|
||||||
|
|
||||||
|
private bool GposeActive => this.dalamud.ClientState != null &&
|
||||||
|
this.dalamud.ClientState.Condition[ConditionFlag.WatchingCutscene];
|
||||||
|
|
||||||
|
private bool ShouldHide => this.CutsceneActive || this.GposeActive || this.dalamud.Framework.Gui.GameUiHidden;
|
||||||
|
|
||||||
private void DrawTippy()
|
private void DrawTippy()
|
||||||
{
|
{
|
||||||
if (this.tippyState == TippyState.BeforeIntro && this.tippyLogicTimer.ElapsedMilliseconds > 8000) {
|
if (this.tippyState == TippyState.BeforeIntro && this.tippyLogicTimer.ElapsedMilliseconds > 8000) {
|
||||||
|
|
@ -362,7 +372,7 @@ namespace Dalamud
|
||||||
|
|
||||||
ImGui.PushFont(InterfaceManager.FoolsFont);
|
ImGui.PushFont(InterfaceManager.FoolsFont);
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(this.tippyText))
|
if (!string.IsNullOrEmpty(this.tippyText) && !ShouldHide)
|
||||||
{
|
{
|
||||||
DrawTextBox(this.tippyText);
|
DrawTextBox(this.tippyText);
|
||||||
}
|
}
|
||||||
|
|
@ -372,17 +382,16 @@ namespace Dalamud
|
||||||
ImGui.SetCursorPosX(230);
|
ImGui.SetCursorPosX(230);
|
||||||
ImGui.SetCursorPosY(18 + 55);
|
ImGui.SetCursorPosY(18 + 55);
|
||||||
|
|
||||||
DrawTippyAnim();
|
if (!ShouldHide)
|
||||||
|
DrawTippyAnim();
|
||||||
|
|
||||||
ImGui.End();
|
ImGui.End();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ImGui.PushStyleColor(ImGuiCol.Button, new Vector4(0.6f, 0.6f, 0.6f, 1f));
|
ImGui.PushStyleColor(ImGuiCol.Button, new Vector4(0.6f, 0.6f, 0.6f, 1f));
|
||||||
|
|
||||||
ImGui.PushStyleColor(ImGuiCol.Text, new Vector4(0, 0, 0, 1));
|
ImGui.PushStyleColor(ImGuiCol.Text, new Vector4(0, 0, 0, 1));
|
||||||
|
|
||||||
if (this.showTippyButton) {
|
if (this.showTippyButton && !ShouldHide) {
|
||||||
ImGui.SetNextWindowPos(tippyPos + new Vector2(117, 117), ImGuiCond.Always);
|
ImGui.SetNextWindowPos(tippyPos + new Vector2(117, 117), ImGuiCond.Always);
|
||||||
ImGui.SetNextWindowSize(new Vector2(95, 40), ImGuiCond.Always);
|
ImGui.SetNextWindowSize(new Vector2(95, 40), ImGuiCond.Always);
|
||||||
//ImGui.SetNextWindowFocus();
|
//ImGui.SetNextWindowFocus();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue