From df159613f4aff9096a1635af153459ef2e2c44a0 Mon Sep 17 00:00:00 2001 From: goaaats Date: Mon, 31 Jan 2022 20:27:43 +0100 Subject: [PATCH] fix(TSM): hide during charaselect/make + respect setting --- .../Internal/Windows/TitleScreenMenuWindow.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Dalamud/Interface/Internal/Windows/TitleScreenMenuWindow.cs b/Dalamud/Interface/Internal/Windows/TitleScreenMenuWindow.cs index 429986c64..52949ff6c 100644 --- a/Dalamud/Interface/Internal/Windows/TitleScreenMenuWindow.cs +++ b/Dalamud/Interface/Internal/Windows/TitleScreenMenuWindow.cs @@ -3,8 +3,10 @@ using System.Collections.Generic; using System.IO; using System.Numerics; +using Dalamud.Configuration.Internal; using Dalamud.Game; using Dalamud.Game.ClientState; +using Dalamud.Game.Gui; using Dalamud.Interface.Animation.EasingFunctions; using Dalamud.Interface.Windowing; using ImGuiNET; @@ -317,6 +319,16 @@ namespace Dalamud.Interface.Internal.Windows { var clientState = Service.Get(); this.IsOpen = !clientState.IsLoggedIn; + + var configuration = Service.Get(); + if (!configuration.ShowTsm) + this.IsOpen = false; + + var gameGui = Service.Get(); + var charaSelect = gameGui.GetAddonByName("CharaSelect", 1); + var charaMake = gameGui.GetAddonByName("CharaMake", 1); + if (charaMake != IntPtr.Zero || charaSelect != IntPtr.Zero) + this.IsOpen = false; } } }