Fix to prevent overriden style from appling to the config window
This commit is contained in:
@@ -134,11 +134,6 @@ public sealed class Plugin : IDalamudPlugin {
|
|||||||
|
|
||||||
private void Draw()
|
private void Draw()
|
||||||
{
|
{
|
||||||
if (Config.OverrideStyle)
|
|
||||||
{
|
|
||||||
var styles = StyleModel.GetConfiguredStyles();
|
|
||||||
styles?.First(style => style.Name.Equals(Config.ChosenStyle)).Push();
|
|
||||||
}
|
|
||||||
|
|
||||||
Interface.UiBuilder.DisableUserUiHide = !Config.HideWhenUiHidden;
|
Interface.UiBuilder.DisableUserUiHide = !Config.HideWhenUiHidden;
|
||||||
ChatLogWindow.DefaultText = ImGui.GetStyle().Colors[(int) ImGuiCol.Text];
|
ChatLogWindow.DefaultText = ImGui.GetStyle().Colors[(int) ImGuiCol.Text];
|
||||||
@@ -147,12 +142,6 @@ public sealed class Plugin : IDalamudPlugin {
|
|||||||
{
|
{
|
||||||
WindowSystem.Draw();
|
WindowSystem.Draw();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Config.OverrideStyle)
|
|
||||||
{
|
|
||||||
var styles = StyleModel.GetConfiguredStyles();
|
|
||||||
styles?.First(style => style.Name.Equals(Config.ChosenStyle)).Pop();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
internal void SaveConfig() {
|
internal void SaveConfig() {
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ using Dalamud.Game.Text.SeStringHandling;
|
|||||||
using Dalamud.Game.Text.SeStringHandling.Payloads;
|
using Dalamud.Game.Text.SeStringHandling.Payloads;
|
||||||
using Dalamud.Interface;
|
using Dalamud.Interface;
|
||||||
using Dalamud.Interface.Internal;
|
using Dalamud.Interface.Internal;
|
||||||
|
using Dalamud.Interface.Style;
|
||||||
using Dalamud.Interface.Utility;
|
using Dalamud.Interface.Utility;
|
||||||
using Dalamud.Interface.Windowing;
|
using Dalamud.Interface.Windowing;
|
||||||
using Dalamud.Memory;
|
using Dalamud.Memory;
|
||||||
@@ -96,6 +97,24 @@ public sealed class ChatLogWindow : Window, IUiComponent {
|
|||||||
Plugin.AddonLifecycle.RegisterListener(AddonEvent.PostRequestedUpdate, "ItemDetail", PayloadHandler.MoveTooltip);
|
Plugin.AddonLifecycle.RegisterListener(AddonEvent.PostRequestedUpdate, "ItemDetail", PayloadHandler.MoveTooltip);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override void PreDraw()
|
||||||
|
{
|
||||||
|
if (Plugin.Config.OverrideStyle)
|
||||||
|
{
|
||||||
|
var styles = StyleModel.GetConfiguredStyles();
|
||||||
|
styles?.First(style => style.Name.Equals(Plugin.Config.ChosenStyle)).Push();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void PostDraw()
|
||||||
|
{
|
||||||
|
if (Plugin.Config.OverrideStyle)
|
||||||
|
{
|
||||||
|
var styles = StyleModel.GetConfiguredStyles();
|
||||||
|
styles?.First(style => style.Name.Equals(Plugin.Config.ChosenStyle)).Pop();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void Dispose() {
|
public void Dispose() {
|
||||||
Plugin.AddonLifecycle.UnregisterListener(AddonEvent.PostRequestedUpdate, "ItemDetail", PayloadHandler.MoveTooltip);
|
Plugin.AddonLifecycle.UnregisterListener(AddonEvent.PostRequestedUpdate, "ItemDetail", PayloadHandler.MoveTooltip);
|
||||||
Plugin.ClientState.Logout -= Logout;
|
Plugin.ClientState.Logout -= Logout;
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
using System.Numerics;
|
using System.Numerics;
|
||||||
|
using Dalamud.Interface.Style;
|
||||||
using Dalamud.Interface.Windowing;
|
using Dalamud.Interface.Windowing;
|
||||||
using ImGuiNET;
|
using ImGuiNET;
|
||||||
|
|
||||||
@@ -22,6 +23,11 @@ internal class Popout : Window
|
|||||||
|
|
||||||
public override void PreDraw()
|
public override void PreDraw()
|
||||||
{
|
{
|
||||||
|
if (ChatLogWindow.Plugin.Config.OverrideStyle)
|
||||||
|
{
|
||||||
|
var styles = StyleModel.GetConfiguredStyles();
|
||||||
|
styles?.First(style => style.Name.Equals(ChatLogWindow.Plugin.Config.ChosenStyle)).Push();
|
||||||
|
}
|
||||||
Flags = ImGuiWindowFlags.None;
|
Flags = ImGuiWindowFlags.None;
|
||||||
if (!ChatLogWindow.Plugin.Config.ShowPopOutTitleBar)
|
if (!ChatLogWindow.Plugin.Config.ShowPopOutTitleBar)
|
||||||
Flags |= ImGuiWindowFlags.NoTitleBar;
|
Flags |= ImGuiWindowFlags.NoTitleBar;
|
||||||
@@ -49,7 +55,13 @@ internal class Popout : Window
|
|||||||
|
|
||||||
public override void PostDraw()
|
public override void PostDraw()
|
||||||
{
|
{
|
||||||
|
|
||||||
ChatLogWindow.PopOutDocked[Idx] = ImGui.IsWindowDocked();
|
ChatLogWindow.PopOutDocked[Idx] = ImGui.IsWindowDocked();
|
||||||
|
if (ChatLogWindow.Plugin.Config.OverrideStyle)
|
||||||
|
{
|
||||||
|
var styles = StyleModel.GetConfiguredStyles();
|
||||||
|
styles?.First(style => style.Name.Equals(ChatLogWindow.Plugin.Config.ChosenStyle)).Pop();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void OnClose()
|
public override void OnClose()
|
||||||
|
|||||||
Reference in New Issue
Block a user