SuperTuxKart
Public Member Functions | List of all members
GamepadAndroidConfig Class Reference

specialisation of DeviceConfig for android gamepad devices More...

#include <gamepad_android_config.hpp>

Inheritance diagram for GamepadAndroidConfig:
Inheritance graph
[legend]

Public Member Functions

virtual void setDefaultBinds ()
 
virtual void save (std::ofstream &stream)
 Saves the configuration to a file. More...
 
virtual irr::core::stringw getBindingAsString (const PlayerAction action) const
 Get a user-readable string describing the bound action.
 
virtual bool isGamePad () const
 
virtual bool isGamePadAndroid () const
 
virtual bool isKeyboard () const
 
- Public Member Functions inherited from DeviceConfig
irr::core::stringw toString ()
 
bool hasBindingFor (const int buttonID) const
 
bool hasBindingFor (const int buttonID, PlayerAction from, PlayerAction to) const
 
void setBinding (const PlayerAction action, const Input::InputType type, const int id, Input::AxisDirection direction=Input::AD_NEUTRAL, Input::AxisRange range=Input::AR_HALF, wchar_t character=0)
 Sets the bindings for an action. More...
 
bool getMenuAction (Input::InputType type, const int id, int *value, PlayerAction *action)
 Searches for a game actions associated with the given input event. More...
 
irr::core::stringw getMappingIdString (const PlayerAction action) const
 Get an internal unique string describing the bound action. More...
 
virtual bool load (const XMLNode *config)
 Reads a device configuration from input.xml. More...
 
virtual bool isAnalog () const
 Returns true if this device has analog axis, so that steering values will not be affected by time-full-steer delays. More...
 
virtual bool desensitize () const
 Returns true if this device should desensitize its input at values close to 0 (to avoid 'oversteering'). More...
 
virtual int getNumberOfButtons () const
 Should only be called for gamepads, which has its own implementation. More...
 
virtual int getNumberOfAxes () const
 Should only be called for gamepads, which has its own implementation. More...
 
void setName (const std::string &name)
 Sets the name of this device. More...
 
const std::string & getName () const
 Returns the name for this device configuration. More...
 
void setPlugged ()
 Increase ref counter. More...
 
bool isPlugged () const
 Returns if this config is sed by any devices. More...
 
int getNumberOfDevices () const
 Returns the number of devices using this configuration. More...
 
const BindinggetBinding (int i) const
 Returns the binding of a given index. More...
 
bool isEnabled () const
 At this time only relevant for gamepads, keyboards are always enabled.
 
void setEnabled (bool new_value)
 Sets this config to be enabled or disabled. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from DeviceConfig
static DeviceConfigcreate (const XMLNode *config)
 A simple factory that creates either a gamepad or a keyboard configuration. More...
 
- Protected Member Functions inherited from DeviceConfig
bool doGetAction (Input::InputType type, const int id, int *value, const PlayerAction firstActionToCheck, const PlayerAction lastActionToCheck, PlayerAction *action)
 internal helper method for DeviceConfig::getGameAction and DeviceConfig::getMenuAction
 
bool getGameAction (Input::InputType type, const int id, int *value, PlayerAction *action)
 Searches for a game actions associated with the given input event. More...
 
- Protected Attributes inherited from DeviceConfig
Binding m_bindings [PA_COUNT]
 

Detailed Description

specialisation of DeviceConfig for android gamepad devices

Member Function Documentation

◆ save()

void GamepadAndroidConfig::save ( std::ofstream &  stream)
virtual

Saves the configuration to a file.

It writes the name for a gamepad config, saves the device specific parameters, and calls DeviceConfig::save() to save the rest.

Parameters
streamThe stream to save to.

Reimplemented from KeyboardConfig.


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