Header menu logo Mibo

GamepadButtonCode Module

Functions for translating between MonoGame's Buttons and Mibo's backend-neutral GamepadButtonCode.

Functions and values

Function or value Description

ofMonoGameButton b

Full Usage: ofMonoGameButton b

Parameters:
Returns: GamepadButtonCode

Maps a MonoGame Buttons to the backend-neutral GamepadButtonCode. Returns GamepadButtonCode.Unknown for any button with no logical equivalent.

MonoGame's Buttons uses an Xbox layout: A/B/X/Y for face buttons, LeftShoulder/RightShoulder for bumpers, LeftTrigger/RightTrigger for triggers. We map to the abstract FaceUp/FaceRight/FaceDown/FaceLeft (Xbox: Y/B/A/X).

b : Buttons
Returns: GamepadButtonCode

toMonoGameButton b

Full Usage: toMonoGameButton b

Parameters:
Returns: Buttons

Maps a backend-neutral GamepadButtonCode back to a MonoGame Buttons. Returns Buttons.None for GamepadButtonCode.Unknown.

b : GamepadButtonCode
Returns: Buttons

Type something to start searching.