mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-13 12:14:16 +01:00
feat: start of UI dev menu for Dalamud
This commit is contained in:
parent
24450cf830
commit
fc5a8bc38e
1 changed files with 32 additions and 1 deletions
|
|
@ -97,12 +97,42 @@ namespace Dalamud {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private bool isImguiDrawDemoWindow = true;
|
private bool isImguiDrawDemoWindow = false;
|
||||||
private bool isImguiDrawWelcome = true;
|
private bool isImguiDrawWelcome = true;
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
private bool isImguiDrawDevMenu = true;
|
||||||
|
#else
|
||||||
|
private bool isImguiDrawDevMenu = false;
|
||||||
|
#endif
|
||||||
|
|
||||||
private bool neverDrawWelcome = false;
|
private bool neverDrawWelcome = false;
|
||||||
|
|
||||||
private void BuildDalamudUi() {
|
private void BuildDalamudUi() {
|
||||||
|
if (this.isImguiDrawDevMenu) {
|
||||||
|
if (ImGui.BeginMainMenuBar()) {
|
||||||
|
if (ImGui.BeginMenu("Dalamud DEBUG")) {
|
||||||
|
if (ImGui.MenuItem("Open Log window")) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
ImGui.MenuItem("Draw ImGui demo", "", ref this.isImguiDrawDemoWindow);
|
||||||
|
|
||||||
|
ImGui.Separator();
|
||||||
|
|
||||||
|
if (ImGui.MenuItem("Unload Dalamud"))
|
||||||
|
{
|
||||||
|
Unload();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ImGui.MenuItem("Kill game"))
|
||||||
|
{
|
||||||
|
Process.GetCurrentProcess().Kill();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (this.isImguiDrawDemoWindow)
|
if (this.isImguiDrawDemoWindow)
|
||||||
ImGui.ShowDemoWindow();
|
ImGui.ShowDemoWindow();
|
||||||
|
|
||||||
|
|
@ -115,6 +145,7 @@ namespace Dalamud {
|
||||||
ImGui.Text($"dalamud says hello. ({this.assemblyVersion})");
|
ImGui.Text($"dalamud says hello. ({this.assemblyVersion})");
|
||||||
ImGui.Checkbox("Don't show this message again", ref this.neverDrawWelcome);
|
ImGui.Checkbox("Don't show this message again", ref this.neverDrawWelcome);
|
||||||
ImGui.Spacing();
|
ImGui.Spacing();
|
||||||
|
ImGui.Spacing();
|
||||||
|
|
||||||
if (ImGui.Button("Close")) {
|
if (ImGui.Button("Close")) {
|
||||||
this.isImguiDrawWelcome = false;
|
this.isImguiDrawWelcome = false;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue