feat(ui): tabbed Settings shell — IPanelRenderer tab API + 6 placeholder tabs
Phase L.0 — foundation for the complete retail-style Settings interface agreed in the 2026-04-26 brainstorm. Splits Phase K's keybind-only F11 panel into a tabbed shell whose first tab wraps the existing keybinds content unchanged; the other five tabs (Display / Audio / Gameplay / Chat / Character) render "Coming soon" placeholders so the shape the user approved is visible immediately and gets filled in over the L.x sub-phases (Display first per Easy-wins build order). Why a tab API extension: retail had distinct Options UIs (gmGameplayOptionsUI / gmChatOptionsUI / gmCharacterSettingsUI per the PDB at acclient_2013_pseudo_c.txt:170739+) and the existing IPanelRenderer only exposed CollapsingHeader. ImGui maps BeginTabBar / BeginTabItem / EndTabItem / EndTabBar 1:1, so the new primitives stay backend-friendly — the future D.2b custom retail-look backend implements them via the retail tab UIs without panel changes. Save / Cancel / Reset-all stay above the tab bar so they remain global across all tabs (Phase K's UX preserved). FakePanelRenderer grows matching tab calls + an ActiveTabLabel knob so tests can target a specific tab's content; default behavior treats the first tab item seen as active so existing tests keep passing without changes. 5 new SettingsPanelTests assertions: tab bar opens once, six expected tab labels emitted in order, Keybinds-tab section headers only render when active, placeholders show "Coming soon" text on inactive-content tabs, and Save/Cancel buttons render BEFORE the tab bar (regression guard against accidentally moving them inside a tab item). dotnet build green (0 warnings); dotnet test 1,227 / 1,227 green (243 Core.Net + 311 UI.Abstractions + 673 Core). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
5145938d06
commit
7665cdf642
5 changed files with 235 additions and 18 deletions
|
|
@ -193,4 +193,18 @@ public sealed class ImGuiPanelRenderer : IPanelRenderer
|
|||
=> shortcut is null
|
||||
? ImGuiNET.ImGui.MenuItem(label)
|
||||
: ImGuiNET.ImGui.MenuItem(label, shortcut);
|
||||
|
||||
// -- Tab bar -----------------------------------------------------------
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool BeginTabBar(string id) => ImGuiNET.ImGui.BeginTabBar(id);
|
||||
|
||||
/// <inheritdoc />
|
||||
public void EndTabBar() => ImGuiNET.ImGui.EndTabBar();
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool BeginTabItem(string label) => ImGuiNET.ImGui.BeginTabItem(label);
|
||||
|
||||
/// <inheritdoc />
|
||||
public void EndTabItem() => ImGuiNET.ImGui.EndTabItem();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue