Selkies
Developer ReferenceDashboardComponents

components/PlayerGamepadButton

Floating touch-gamepad toggle for the player clients.

Functions

GamepadIcon()

function GamepadIcon(): Element;

Defined in: components/PlayerGamepadButton.jsx:23

Four-way arrow glyph drawn on the toggle.

Returns

Element


PlayerGamepadButton()

function PlayerGamepadButton(): Element;

Defined in: components/PlayerGamepadButton.jsx:39

Draggable button that shows and hides the touch gamepad for the #player2 to #player4 clients, which render no dashboard.

Always visible rather than gated on touch detection: these slots exist to contribute gamepad input, so the toggle must be reachable on any device. The first activation posts TOUCH_GAMEPAD_SETUP to the window, later toggles post TOUCH_GAMEPAD_VISIBILITY; a press that travels further than DRAG_THRESHOLD moves the button instead of toggling.

Returns

Element

References

default

Renames and re-exports PlayerGamepadButton

On this page

Edit on GitHub