feat(ui): #25 Phase K.3 — Settings panel + click-to-rebind + Phase K shipped
Phase K final commit. Settings panel with click-to-rebind UX on top of the K.1+K.2 input architecture, plus the roadmap / ISSUES / memory updates that retire Phase K. InputDispatcher gains BeginCapture / CancelCapture / IsCapturing / SetBindings — modal capture suppresses normal action firing for the next chord. Esc cancels (returns sentinel default chord); modifier-only keys don't complete capture; non-modifier key down with current modifier mask completes. IPanelRenderer + ImGuiPanelRenderer + FakePanelRenderer gain BeginMainMenuBar / EndMainMenuBar / BeginMenu / EndMenu / MenuItem primitives. SettingsVM owns a draft copy of KeyBindings with explicit Save / Cancel / Reset semantics. Click-to-rebind enters dispatcher capture mode; on chord captured, conflict-detect against draft (excluding the action being rebound itself); surface a ConflictPrompt when the chord collides; ResolveConflict(replace=true|false) commits or reverts. ResetActionToDefault restores a single action to RetailDefaults(); ResetAllToDefaults rebuilds the entire draft. Save invokes the onSave callback (which writes JSON + swaps the live dispatcher's bindings). SettingsPanel renders 8 retail-keymap-categorized CollapsingHeader sections (Movement, Postures, Camera, Combat, UI panels, Chat, Hotbar, Emotes). Per action: name + current binding(s) summary + "Rebind"/"Reset" buttons. Conflict prompt at the top when pending. Save / Cancel / "Reset all to retail defaults" at the top. GameWindow registers SettingsPanel + wires F11 → ToggleOptionsPanel → IsVisible toggle, plus a top-of-frame ImGui MainMenuBar with View → Settings/Vitals/Chat/Debug entries (calls ImGui directly — the abstraction methods exist for backend portability but the host doesn't own a menu-bar surface). Tests: +37 across InputDispatcherCaptureTests (7), IPanelRendererMainMenuBarTests (9), SettingsVMTests (13), SettingsPanelTests (8). Solution total 1220 green. Roadmap (docs/plans/2026-04-11-roadmap.md) appends Phase K shipped section after Phase J with K.1a–K.3 commit SHAs. ISSUES.md files Phase L deferred work as #L.1–#L.8 (hotbar UI, spellbook favorites, combat-mode dispatch, F-key panels, floating chat windows, UI layout save/load, joystick bindings, plugin input subscription) and adds #21–#25 to Recently closed. project_input_pipeline.md updated to shipped state. CLAUDE.md gets an input-pipeline reference. Closes Phase K. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
af74eac0c2
commit
f42c164b90
14 changed files with 1567 additions and 5 deletions
|
|
@ -206,4 +206,33 @@ public interface IPanelRenderer
|
|||
/// typing without clicking the field.
|
||||
/// </summary>
|
||||
void SetKeyboardFocusHere();
|
||||
|
||||
// -- Phase K.3 — top-of-screen main menu bar -------------------------
|
||||
|
||||
/// <summary>
|
||||
/// Open the top-of-screen main menu bar. Returns true if the bar is
|
||||
/// visible (top-level menus go inside that branch). Always pair with
|
||||
/// <see cref="EndMainMenuBar"/> when the call returned true.
|
||||
/// </summary>
|
||||
bool BeginMainMenuBar();
|
||||
|
||||
/// <summary>Close the menu bar opened by <see cref="BeginMainMenuBar"/>.</summary>
|
||||
void EndMainMenuBar();
|
||||
|
||||
/// <summary>
|
||||
/// Open a top-level menu within a menu bar. Returns true if the menu
|
||||
/// is open — the caller emits <see cref="MenuItem"/> entries inside
|
||||
/// that branch, then calls <see cref="EndMenu"/>.
|
||||
/// </summary>
|
||||
bool BeginMenu(string label);
|
||||
|
||||
/// <summary>Close the menu opened by <see cref="BeginMenu"/>.</summary>
|
||||
void EndMenu();
|
||||
|
||||
/// <summary>
|
||||
/// A clickable menu item with optional shortcut hint (e.g.
|
||||
/// <c>"F11"</c>) drawn right-aligned. Returns true on the single
|
||||
/// frame the user clicks the item; false otherwise.
|
||||
/// </summary>
|
||||
bool MenuItem(string label, string? shortcut = null);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue