Added The ability to override the plugin style
This commit is contained in:
@@ -6,6 +6,7 @@ using ChatTwo.Resources;
|
||||
using ChatTwo.Ui;
|
||||
using ChatTwo.Util;
|
||||
using Dalamud.Game.ClientState.Objects;
|
||||
using Dalamud.Interface.Style;
|
||||
using Dalamud.Interface.Windowing;
|
||||
using Dalamud.IoC;
|
||||
using Dalamud.Plugin;
|
||||
@@ -133,6 +134,12 @@ public sealed class Plugin : IDalamudPlugin {
|
||||
|
||||
private void Draw()
|
||||
{
|
||||
if (Config.OverrideStyle)
|
||||
{
|
||||
var styles = StyleModel.GetConfiguredStyles();
|
||||
styles?.First(style => style.Name.Equals(Config.ChosenStyle)).Push();
|
||||
}
|
||||
|
||||
Interface.UiBuilder.DisableUserUiHide = !Config.HideWhenUiHidden;
|
||||
ChatLogWindow.DefaultText = ImGui.GetStyle().Colors[(int) ImGuiCol.Text];
|
||||
|
||||
@@ -140,6 +147,12 @@ public sealed class Plugin : IDalamudPlugin {
|
||||
{
|
||||
WindowSystem.Draw();
|
||||
}
|
||||
|
||||
if (Config.OverrideStyle)
|
||||
{
|
||||
var styles = StyleModel.GetConfiguredStyles();
|
||||
styles?.First(style => style.Name.Equals(Config.ChosenStyle)).Pop();
|
||||
}
|
||||
}
|
||||
|
||||
internal void SaveConfig() {
|
||||
|
||||
Reference in New Issue
Block a user