libultraship
Reimplementations of libultra (N64 SDK) functions for modern hardware
Loading...
Searching...
No Matches
Ship::SDLButtonToAnyMapping Class Reference

Base class for mappings that bind an SDL gamepad button to any controller input. More...

#include <SDLButtonToAnyMapping.h>

Inheritance diagram for Ship::SDLButtonToAnyMapping:
[legend]
Collaboration diagram for Ship::SDLButtonToAnyMapping:
[legend]

Public Member Functions

 SDLButtonToAnyMapping (int32_t sdlControllerButton)
 Constructs an SDL button mapping.
 
virtual ~SDLButtonToAnyMapping ()
 Destructor.
 
std::string GetPhysicalInputName () override
 Returns the human-readable name of the bound button.
 
std::string GetPhysicalDeviceName () override
 Returns the human-readable name of the SDL gamepad device.
 
- Public Member Functions inherited from Ship::ControllerInputMapping
 ControllerInputMapping (PhysicalDeviceType physicalDeviceType)
 Constructs a ControllerInputMapping for the given physical device type.
 
 ~ControllerInputMapping ()
 
- Public Member Functions inherited from Ship::ControllerMapping
 ControllerMapping (PhysicalDeviceType physicalDeviceType)
 Constructs a ControllerMapping for the given physical device type.
 
 ~ControllerMapping ()
 
PhysicalDeviceType GetPhysicalDeviceType ()
 Returns the physical device type for this mapping.
 

Protected Attributes

SDL_GameControllerButton mControllerButton
 
- Protected Attributes inherited from Ship::ControllerMapping
PhysicalDeviceType mPhysicalDeviceType
 

Detailed Description

Base class for mappings that bind an SDL gamepad button to any controller input.

Provides shared button storage, physical device/input name reporting, and a helper for generating generic button labels when the SDL database lacks a human-readable name.

Constructor & Destructor Documentation

◆ SDLButtonToAnyMapping()

Ship::SDLButtonToAnyMapping::SDLButtonToAnyMapping ( int32_t  sdlControllerButton)

Constructs an SDL button mapping.

Parameters
sdlControllerButtonThe SDL controller button index.

◆ ~SDLButtonToAnyMapping()

virtual Ship::SDLButtonToAnyMapping::~SDLButtonToAnyMapping ( )
virtual

Destructor.

Member Function Documentation

◆ GetPhysicalDeviceName()

std::string Ship::SDLButtonToAnyMapping::GetPhysicalDeviceName ( )
overridevirtual

Returns the human-readable name of the SDL gamepad device.

Reimplemented from Ship::ControllerMapping.

Reimplemented in Ship::SDLButtonToAxisDirectionMapping, and Ship::SDLButtonToButtonMapping.

◆ GetPhysicalInputName()

std::string Ship::SDLButtonToAnyMapping::GetPhysicalInputName ( )
overridevirtual

Returns the human-readable name of the bound button.

Reimplemented from Ship::ControllerInputMapping.

Reimplemented in Ship::SDLButtonToAxisDirectionMapping, and Ship::SDLButtonToButtonMapping.

Member Data Documentation

◆ mControllerButton

SDL_GameControllerButton Ship::SDLButtonToAnyMapping::mControllerButton
protected

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