mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-30 04:13:40 +01:00
feat: add imgui color helper
This commit is contained in:
parent
f5054f5274
commit
bb3006d0c8
6 changed files with 166 additions and 17 deletions
|
|
@ -7,6 +7,7 @@ using System.Runtime.CompilerServices;
|
|||
using System.Runtime.InteropServices;
|
||||
|
||||
using CheapLoc;
|
||||
using Dalamud.Interface.Colors;
|
||||
using Dalamud.Interface.Components;
|
||||
using Dalamud.Interface.Windowing;
|
||||
using Dalamud.Plugin;
|
||||
|
|
@ -31,6 +32,7 @@ namespace Dalamud.Interface
|
|||
private readonly DalamudPluginStatWindow pluginStatWindow;
|
||||
private readonly DalamudChangelogWindow changelogWindow;
|
||||
private readonly ComponentDemoWindow componentDemoWindow;
|
||||
private readonly ColorDemoWindow colorDemoWindow;
|
||||
|
||||
private readonly WindowSystem windowSystem = new WindowSystem("DalamudCore");
|
||||
|
||||
|
|
@ -100,6 +102,12 @@ namespace Dalamud.Interface
|
|||
};
|
||||
this.windowSystem.AddWindow(this.componentDemoWindow);
|
||||
|
||||
this.colorDemoWindow = new ColorDemoWindow()
|
||||
{
|
||||
IsOpen = false,
|
||||
};
|
||||
this.windowSystem.AddWindow(this.colorDemoWindow);
|
||||
|
||||
Log.Information("[DUI] Windows added");
|
||||
|
||||
if (dalamud.Configuration.LogOpenAtStartup)
|
||||
|
|
@ -208,6 +216,11 @@ namespace Dalamud.Interface
|
|||
this.OpenComponentDemo();
|
||||
}
|
||||
|
||||
if (ImGui.MenuItem("Open Colors Demo"))
|
||||
{
|
||||
this.OpenColorsDemo();
|
||||
}
|
||||
|
||||
ImGui.MenuItem("Draw ImGui demo", string.Empty, ref this.isImguiDrawDemoWindow);
|
||||
|
||||
ImGui.Separator();
|
||||
|
|
@ -420,6 +433,14 @@ namespace Dalamud.Interface
|
|||
this.componentDemoWindow.IsOpen = true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Open the colors test window.
|
||||
/// </summary>
|
||||
internal void OpenColorsDemo()
|
||||
{
|
||||
this.colorDemoWindow.IsOpen = true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Toggle the Plugin Installer window.
|
||||
/// </summary>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue