Header menu logo Mibo

Gamepad Module

Gamepad input subscriptions for Elmish.

Functions and values

Function or value Description

listen handler ctx

Full Usage: listen handler ctx

Parameters:
Returns: Sub<'Msg>

Listen to all gamepad input changes (buttons and analog).

handler : GamepadDelta -> 'Msg
ctx : GameContext
Returns: Sub<'Msg>

listenPlayer player handler ctx

Full Usage: listenPlayer player handler ctx

Parameters:
Returns: Sub<'Msg>

Listen to gamepad input for a specific player.

player : PlayerIndex
handler : GamepadDelta -> 'Msg
ctx : GameContext
Returns: Sub<'Msg>

onConnected handler ctx

Full Usage: onConnected handler ctx

Parameters:
Returns: Sub<'Msg>

Called when a gamepad connects.

handler : PlayerIndex -> 'Msg
ctx : GameContext
Returns: Sub<'Msg>

onConnectionChange handler ctx

Full Usage: onConnectionChange handler ctx

Parameters:
Returns: Sub<'Msg>

Listen to all connection/disconnection events.

handler : GamepadConnection -> 'Msg
ctx : GameContext
Returns: Sub<'Msg>

onDisconnected handler ctx

Full Usage: onDisconnected handler ctx

Parameters:
Returns: Sub<'Msg>

Called when a gamepad disconnects.

handler : PlayerIndex -> 'Msg
ctx : GameContext
Returns: Sub<'Msg>

Type something to start searching.