Skip to content

feat: add hotkeys showcase screen - #3227

Merged
DreadKnight merged 2 commits into
FreezingMoon:masterfrom
Ratanlavate:feat/hotkeys-screen
Oct 24, 2026
Merged

DreadKnight merged 2 commits into
FreezingMoon:masterfrom
Ratanlavate:feat/hotkeys-screen

Conversation

@Ratanlavate

Copy link
Copy Markdown

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 existing framed-modal pattern (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; Slash registered in getHotKeys.
  • src/ui/interface.ts — InterfaceView extended with 'hotkeys'. toggleHotkeysScreen()/closeHotkeysScreen() methods. Hotkeys participates in interfaceViewSignals, isViewOpen, closeView, right-click topmost-close, Escape via closeOpenInterfaceViews, and close-button binding.
  • src/input/hotkey-gate.ts — isHotkeysViewHotkey (bare /) added to isViewSwitchHotkey so 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 — Slash added to the "board-free hotkeys stay live" test.

Testing

  • jest src/__tests__/input/hotkey-gate.ts — all 10 tests pass.
  • tsc --noEmit — clean.
  • eslint on changed files — clean.
  • Full test suite: same 24 pre-existing failures before and after this change (verified via git stash).

Closes #308

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
@vercel

vercel Bot commented Oct 19, 2026

Copy link
Copy Markdown

Someone is attempting to deploy a commit to the FreezingMoon Team on Vercel.

A member of the Team first needs to authorize it.

@vercel

vercel Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
ancientbeast Ready Ready Preview Oct 19, 2026 3:47pm UTC

@DreadKnight

Copy link
Copy Markdown
Member

@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.
@Ratanlavate

Copy link
Copy Markdown
Author

Thanks for the feedback! Updated in 657fb7c:

  • Added a dedicated framed-modal--hotkeys class (640px wide on screens ≥ 600px) so both columns fit without scrolling
  • Removed max-height / overflow-y: auto from .hotkeys-inner on desktop — no more scrollbar
  • Narrow screens still get the flex-wrap fallback

Ready for another look!

@Ratanlavate
Ratanlavate marked this pull request as ready for review October 19, 2026 15:18
@DreadKnight
DreadKnight merged commit 4d0345e into FreezingMoon:master Oct 24, 2026
1 check passed
@DreadKnight

Copy link
Copy Markdown
Member

@Ratanlavate Good job, I took it from here 🐻 👍🏻

Please provide ERC20 wallet for the project token bounty 🪙

@Ratanlavate

Copy link
Copy Markdown
Author

Thanks a lot for the kind words and for merging! 🙌

Here's my ERC20 wallet address for the bounty:

0x17211FCb6791a802ccB6A436C913d7B52Bc421f7

Happy to contribute more to Ancient Beast! 🐺

@DreadKnight

Copy link
Copy Markdown
Member

@Ratanlavate Neat! Looking forward to more PRs. 🐻 🙌🏻
Bounty + bonus sent -> https://www.mintme.com/explorer/tx/0xdb406227c6c14fe83537414aca89831b5194490a7566c1fd8e0dca1412f0cc34 🪙

This branch was successfully deployed

1 active deployment
Preview — 657fb7c3 Deployed Oct 19, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

new screen that showcases hotkeys [bounty: 66 XTR]

2 participants