Skip to content

A touch drawer takes the shelf's place, and useInputMode() says which device is in hand - #17

Merged
explodi merged 2 commits into
mainfrom
touch-drawer-and-input-mode
Nov 28, 2026
Merged

explodi merged 2 commits into
mainfrom
touch-drawer-and-input-mode

Conversation

@explodi

@explodi explodi commented Nov 28, 2026

Copy link
Copy Markdown
Owner

Two changes from a game that vendors Bureau, one commit each.

A touch drawer takes the shelf's place

A tooltip is read by hovering, and a finger never hovers. TouchDrawer is the dock's drawer for a finger: it takes the dock's place and shows one tool at a time, with what the tooltip would have said printed in the open, arrow keys either side to step through the tools, and folder tabs when the drawer files its tools under sections. Shelf goes, with its tests. Tabs, HudKey, Button and the tokens follow, and the bevel golden is recorded again.

useInputMode()

The device in the player's hand, as a hook: "mouse", "touch" or "gamepad". getInputMode() already answered outside React. A pointer keeps its place and its hover after the hand leaves it for the pad, so a dock that reads hover as "the player is navigating me" needs to know which device is in use, and to hear when it changes. useHintDevice() reads it.

Checked

deno install --frozen, deno fmt --check, deno lint, deno task check and deno task test (390 passed) on this branch over main.

…hows one tool at a time, with what its tooltip would say
A pointer keeps its place and its hover after the hand leaves it for the pad. A dock that reads hover as the player navigating it can now tell which device is in use.
@explodi
explodi merged commit 1da2d71 into main Nov 28, 2026
2 checks passed
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.

1 participant