feat(settings): breadcrumb header and esc to return to overview
This commit is contained in:
@@ -88,6 +88,18 @@ public sealed class SettingsWindow : Dalamud.Interface.Windowing.Window
|
|||||||
View = SettingsView.Overview;
|
View = SettingsView.Overview;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ESC im Detail-View kehrt zur Overview zurück. Window-Focus-Check ist
|
||||||
|
// Pflicht — sonst triggert ESC auch wenn der User ein anderes Fenster
|
||||||
|
// fokussiert hat und ESC fürs Game-Menü drückt (Codebase-Pattern siehe
|
||||||
|
// Util/SearchSelector.cs:37).
|
||||||
|
if (View == SettingsView.Detail
|
||||||
|
&& ImGui.IsWindowFocused(ImGuiFocusedFlags.RootAndChildWindows)
|
||||||
|
&& ImGui.IsKeyPressed(ImGuiKey.Escape))
|
||||||
|
{
|
||||||
|
View = SettingsView.Overview;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (View == SettingsView.Overview)
|
if (View == SettingsView.Overview)
|
||||||
Overview.Draw();
|
Overview.Draw();
|
||||||
else
|
else
|
||||||
@@ -110,6 +122,28 @@ public sealed class SettingsWindow : Dalamud.Interface.Windowing.Window
|
|||||||
|
|
||||||
private void DrawDetail()
|
private void DrawDetail()
|
||||||
{
|
{
|
||||||
|
// Breadcrumb-Header — Akzent-Cyan, klickbar, führt zurück zur Overview
|
||||||
|
using (ImRaii.PushColor(ImGuiCol.Text, 0xFF00BED2u))
|
||||||
|
using (ImRaii.PushColor(ImGuiCol.Button, 0u))
|
||||||
|
using (ImRaii.PushColor(ImGuiCol.ButtonHovered, 0x33FFFFFFu))
|
||||||
|
using (ImRaii.PushColor(ImGuiCol.ButtonActive, 0x55FFFFFFu))
|
||||||
|
{
|
||||||
|
if (ImGui.SmallButton("← Settings"))
|
||||||
|
{
|
||||||
|
View = SettingsView.Overview;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
ImGui.SameLine();
|
||||||
|
ImGui.TextUnformatted("·");
|
||||||
|
ImGui.SameLine();
|
||||||
|
ImGui.TextUnformatted(Tabs[CurrentTab].Name.Split("###")[0]);
|
||||||
|
|
||||||
|
ImGui.Spacing();
|
||||||
|
ImGui.Separator();
|
||||||
|
ImGui.Spacing();
|
||||||
|
|
||||||
|
// Tab-Liste + Content (wie vorher)
|
||||||
using (var table = ImRaii.Table("##chat2-settings-table", 2))
|
using (var table = ImRaii.Table("##chat2-settings-table", 2))
|
||||||
{
|
{
|
||||||
if (table.Success)
|
if (table.Success)
|
||||||
|
|||||||
Reference in New Issue
Block a user