@@ -101,20 +101,34 @@ public sealed class ChatLogWindow : Window, IUiComponent {
|
||||
|
||||
public override void PreDraw()
|
||||
{
|
||||
if (Plugin.Config.OverrideStyle)
|
||||
if (Plugin.Config.OverrideStyle && Plugin.Config.ChosenStyle != "")
|
||||
{
|
||||
var styles = StyleModel.GetConfiguredStyles();
|
||||
try
|
||||
{
|
||||
styles?.First(style => style.Name.Equals(Plugin.Config.ChosenStyle)).Push();
|
||||
}
|
||||
catch (InvalidOperationException e)
|
||||
{
|
||||
// Swallow the error - User does not have a valid style set
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void PostDraw()
|
||||
{
|
||||
if (Plugin.Config.OverrideStyle)
|
||||
if (Plugin.Config.OverrideStyle && Plugin.Config.ChosenStyle != "")
|
||||
{
|
||||
var styles = StyleModel.GetConfiguredStyles();
|
||||
try
|
||||
{
|
||||
styles?.First(style => style.Name.Equals(Plugin.Config.ChosenStyle)).Pop();
|
||||
}
|
||||
catch (InvalidOperationException e)
|
||||
{
|
||||
// Swallow the error - User does not have a valid style set
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void Dispose() {
|
||||
|
||||
+16
-2
@@ -25,11 +25,18 @@ internal class Popout : Window
|
||||
|
||||
public override void PreDraw()
|
||||
{
|
||||
if (ChatLogWindow.Plugin.Config.OverrideStyle)
|
||||
if (ChatLogWindow.Plugin.Config.OverrideStyle && ChatLogWindow.Plugin.Config.ChosenStyle != "")
|
||||
{
|
||||
var styles = StyleModel.GetConfiguredStyles();
|
||||
try
|
||||
{
|
||||
styles?.First(style => style.Name.Equals(ChatLogWindow.Plugin.Config.ChosenStyle)).Push();
|
||||
}
|
||||
catch (InvalidOperationException e)
|
||||
{
|
||||
// Swallow the error - User does not have a valid style set
|
||||
}
|
||||
}
|
||||
Flags = ImGuiWindowFlags.None;
|
||||
if (!ChatLogWindow.Plugin.Config.ShowPopOutTitleBar)
|
||||
Flags |= ImGuiWindowFlags.NoTitleBar;
|
||||
@@ -59,11 +66,18 @@ internal class Popout : Window
|
||||
{
|
||||
|
||||
ChatLogWindow.PopOutDocked[Idx] = ImGui.IsWindowDocked();
|
||||
if (ChatLogWindow.Plugin.Config.OverrideStyle)
|
||||
if (ChatLogWindow.Plugin.Config.OverrideStyle && ChatLogWindow.Plugin.Config.ChosenStyle != "")
|
||||
{
|
||||
var styles = StyleModel.GetConfiguredStyles();
|
||||
try
|
||||
{
|
||||
styles?.First(style => style.Name.Equals(ChatLogWindow.Plugin.Config.ChosenStyle)).Pop();
|
||||
}
|
||||
catch (InvalidOperationException e)
|
||||
{
|
||||
// Swallow the error - User does not have a valid style set
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnClose()
|
||||
|
||||
Reference in New Issue
Block a user