Antkeeper  0.0.1
Public Member Functions | Public Attributes | List of all members
input::gamepad_button_mapping Class Reference

Maps a gamepad button to a control input value. More...

#include <mapping.hpp>

Inheritance diagram for input::gamepad_button_mapping:
input::mapping

Public Member Functions

constexpr mapping_type get_mapping_type () const noexcept override
 Returns mapping_type::gamepad_button. More...
 
 gamepad_button_mapping (input::gamepad *gamepad, gamepad_button button)
 Constructs a gamepad button mapping. More...
 
 gamepad_button_mapping ()=default
 Constructs a gamepad button mapping. More...
 
- Public Member Functions inherited from input::mapping
 mapping ()=default
 Constructs an input mapping. More...
 
virtual ~mapping ()=default
 Destructs an input mapping. More...
 

Public Attributes

input::gamepadgamepad {nullptr}
 Pointer to the mapped gamepad, or nullptr if input from any gamepad is accepted. More...
 
gamepad_button button {0}
 Mapped gamepad button. More...
 

Detailed Description

Maps a gamepad button to a control input value.

Definition at line 94 of file mapping.hpp.

Constructor & Destructor Documentation

◆ gamepad_button_mapping() [1/2]

input::gamepad_button_mapping::gamepad_button_mapping ( input::gamepad gamepad,
gamepad_button  button 
)

Constructs a gamepad button mapping.

Parameters
gamepadPointer to the gamepad to map, or nullptr if input from any gamepad will be mapped.
buttonGamepad button to map.

Definition at line 34 of file mapping.cpp.

◆ gamepad_button_mapping() [2/2]

input::gamepad_button_mapping::gamepad_button_mapping ( )
default

Constructs a gamepad button mapping.

Parameters
gamepadPointer to the gamepad to map, or nullptr if input from any gamepad will be mapped.
buttonGamepad button to map.

Member Function Documentation

◆ get_mapping_type()

constexpr mapping_type input::gamepad_button_mapping::get_mapping_type ( ) const
inlineconstexproverridevirtualnoexcept

Returns mapping_type::gamepad_button.

Implements input::mapping.

Definition at line 109 of file mapping.hpp.

Member Data Documentation

◆ button

gamepad_button input::gamepad_button_mapping::button {0}

Mapped gamepad button.

Definition at line 118 of file mapping.hpp.

◆ gamepad

input::gamepad* input::gamepad_button_mapping::gamepad {nullptr}

Pointer to the mapped gamepad, or nullptr if input from any gamepad is accepted.

Definition at line 115 of file mapping.hpp.


The documentation for this class was generated from the following files: