mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-30 04:13:40 +01:00
feat: add style editor
This commit is contained in:
parent
c925611674
commit
0f150bc54b
6 changed files with 280 additions and 96 deletions
|
|
@ -46,6 +46,7 @@ namespace Dalamud.Interface.Internal
|
|||
private readonly ScratchpadWindow scratchpadWindow;
|
||||
private readonly SettingsWindow settingsWindow;
|
||||
private readonly SelfTestWindow selfTestWindow;
|
||||
private readonly StyleEditorWindow styleEditorWindow;
|
||||
|
||||
private ulong frameCount = 0;
|
||||
|
||||
|
|
@ -79,6 +80,7 @@ namespace Dalamud.Interface.Internal
|
|||
this.scratchpadWindow = new ScratchpadWindow() { IsOpen = false };
|
||||
this.settingsWindow = new SettingsWindow() { IsOpen = false };
|
||||
this.selfTestWindow = new SelfTestWindow() { IsOpen = false };
|
||||
this.styleEditorWindow = new StyleEditorWindow() { IsOpen = false };
|
||||
|
||||
this.WindowSystem.AddWindow(this.changelogWindow);
|
||||
this.WindowSystem.AddWindow(this.colorDemoWindow);
|
||||
|
|
@ -93,12 +95,11 @@ namespace Dalamud.Interface.Internal
|
|||
this.WindowSystem.AddWindow(this.scratchpadWindow);
|
||||
this.WindowSystem.AddWindow(this.settingsWindow);
|
||||
this.WindowSystem.AddWindow(this.selfTestWindow);
|
||||
this.WindowSystem.AddWindow(this.styleEditorWindow);
|
||||
|
||||
ImGuiManagedAsserts.AssertsEnabled = true;
|
||||
|
||||
Service<InterfaceManager>.Get().Draw += this.OnDraw;
|
||||
|
||||
Log.Information("Windows added");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -212,6 +213,11 @@ namespace Dalamud.Interface.Internal
|
|||
/// </summary>
|
||||
public void OpenSelfTest() => this.selfTestWindow.IsOpen = true;
|
||||
|
||||
/// <summary>
|
||||
/// Opens the <see cref="StyleEditorWindow"/>.
|
||||
/// </summary>
|
||||
public void OpenStyleEditor() => this.styleEditorWindow.IsOpen = true;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Close
|
||||
|
|
@ -303,6 +309,11 @@ namespace Dalamud.Interface.Internal
|
|||
/// </summary>
|
||||
public void ToggleSelfTestWindow() => this.selfTestWindow.Toggle();
|
||||
|
||||
/// <summary>
|
||||
/// Toggles the <see cref="StyleEditorWindow"/>.
|
||||
/// </summary>
|
||||
public void ToggleStyleEditorWindow() => this.selfTestWindow.Toggle();
|
||||
|
||||
#endregion
|
||||
|
||||
private void OnDraw()
|
||||
|
|
@ -452,6 +463,11 @@ namespace Dalamud.Interface.Internal
|
|||
this.OpenSelfTest();
|
||||
}
|
||||
|
||||
if (ImGui.MenuItem("Open Style Editor"))
|
||||
{
|
||||
this.OpenStyleEditor();
|
||||
}
|
||||
|
||||
ImGui.Separator();
|
||||
|
||||
if (ImGui.MenuItem("Unload Dalamud"))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue