Repository navigation
feat: add hotkeys showcase screen - #3227
Conversation
The '?' hotkey (or bare '/') now opens a screen listing all available in-game hotkeys, grouped by category (Abilities, Turn, Navigation, Views, Misc). - New hotkeys.html template with two-column layout using the existing framed-modal pattern - Slash key registered in getHotKeys and Hotkeys#pressSlash - InterfaceView extended with 'hotkeys'; toggle/close/isViewOpen wired through interfaceViewSignals - Hotkeys view participates in right-click topmost close, Escape via closeOpenInterfaceViews, and the utility/scoreboard hotkey gates - Close button bound like the scoreboard's - Styles for the two-column hotkey list with kbd-style shortcut badges Closes FreezingMoon#308
|
Someone is attempting to deploy a commit to the FreezingMoon Team on Vercel. A member of the Team first needs to authorize it. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
@Ratanlavate Heya! Thanks for your contribution. I've tested this, looks pretty good, though on desktop or larger screens it could use the screen estate better: maybe use flex and show two columns, fitting everything nicely and avoiding scrolling 🐻 |
Address review feedback: on desktop/larger screens the modal now uses 640px width with a dedicated framed-modal--hotkeys class so both columns fit comfortably and the inner content no longer scrolls. On narrow screens the existing flex-wrap fallback still applies.
|
Thanks for the feedback! Updated in 657fb7c:
Ready for another look! |
|
@Ratanlavate Good job, I took it from here 🐻 👍🏻 Please provide ERC20 wallet for the project token bounty 🪙 |
|
Thanks a lot for the kind words and for merging! 🙌 Here's my ERC20 wallet address for the bounty:
Happy to contribute more to Ancient Beast! 🐺 |
|
@Ratanlavate Neat! Looking forward to more PRs. 🐻 🙌🏻 |
Summary
Implements the hotkeys showcase screen requested in #308. Pressing
?(or bare/) now opens a screen listing all available in-game hotkeys, grouped by category.What's added
src/templates/hotkeys.html— New template following the existingframed-modalpattern (same as scoreboard/music player). Two-column layout with sections: Abilities, Turn, Navigation, Views, Misc. Each entry shows the key combo in a styled badge alongside its description.src/index.ejs— Template included alongside the other UI templates.src/ui/hotkeys.ts—pressSlash()method added;Slashregistered ingetHotKeys.src/ui/interface.ts—InterfaceViewextended with'hotkeys'.toggleHotkeysScreen()/closeHotkeysScreen()methods. Hotkeys participates ininterfaceViewSignals,isViewOpen,closeView, right-click topmost-close, Escape viacloseOpenInterfaceViews, and close-button binding.src/input/hotkey-gate.ts—isHotkeysViewHotkey(bare/) added toisViewSwitchHotkeyso the screen opens during frozen input and while the scoreboard is open.src/style/styles.less— Styles for the two-column hotkey list with badge-style shortcut indicators.src/__tests__/input/hotkey-gate.ts—Slashadded to the "board-free hotkeys stay live" test.Testing
jest src/__tests__/input/hotkey-gate.ts— all 10 tests pass.tsc --noEmit— clean.eslinton changed files — clean.git stash).Closes #308