feat: Menu enhancements and UI state updates - #8
Open
willthehuman wants to merge 1 commit into
Open
Conversation
- Add TitlePromptMessage for menu search/filter with text input at top of menu - Add CloseAllMenusMessage to dismiss entire menu stack at once - Add UiScrollerScrollMessage for server-driven scroll position sync - Add UiStackMessage to rebuild entire UI popup stack (spectating support) - Enhance UiStateMessage handling to live-update popup content reactively - Refactor GameState from single activeMenu to menuStack (List<MenuState>) with backward-compatible activeMenu getter for top of stack - Add TitlePromptState and popupScrollPosition to GameState - Convert MenuOverlay to StatefulWidget with search/filter TextField - Wire title_prompt state through GameScreen to MenuOverlay Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
TitlePromptMessageto protocol and a search/filterTextFieldat the top ofMenuOverlaywhen active. Typed characters are sent to the server as key presses for server-side filtering.CloseAllMenusMessagethat clears the entire menu stack plus txt overlays, distinct fromclose_menuwhich pops only the top menu.UiStateMessagehandler to rebuild popup content (txt overlays and menu items) reactively, enabling live updates for god screens, item descriptions, etc.UiScrollerScrollMessageto track server-driven scroll positions for scrollable popups.UiStackMessagethat rebuilds the entire UI popup/menu stack from a list of items, used when a spectator joins mid-game.activeMenufield withmenuStack(List<MenuState>) with a backward-compatibleactiveMenugetter. This properly supports nested menus and stack operations.Key changes
lib/network/dcss_protocol.dartlib/game/game_state.dartTitlePromptState, menu stack,_handleUiState,_handleUiStack, new copyWith paramslib/ui/menu_overlay.dartStatefulWidget, add search/filter barlib/ui/game_screen.darttitlePrompttoMenuOverlayTest plan
title_prompt: open an inventory menu and press Ctrl+F — search bar should appear and filter itemsclose_all_menus: nested menus should all dismiss at onceui-state: open a god description screen and verify it updates if piety changesui-scroller-scroll: verify server-driven scroll position is trackedui-stack: join as a spectator mid-game and verify the UI stack is rebuilt correctlyflutter analyzeto ensure no lint/type errors🤖 Generated with Claude Code