Olympe Engine 2.0
2D Game Engine with ECS Architecture
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
InputProfile Class Reference

#include <InputDevice.h>

Public Member Functions

 InputProfile ()=default
 
 InputProfile (const std::string &name, InputDeviceType type)
 
void AddAction (const std::string &actionName, const InputBinding &binding)
 
const InputBindingGetActionBinding (const std::string &actionName) const
 
bool ValidateNoOverlaps () const
 
void InitializeDefaults ()
 

Public Attributes

std::string profileName
 
InputDeviceType deviceType = InputDeviceType::None
 
std::string description
 
std::unordered_map< std::string, InputBindingactionMappings
 
float deadzone = 0.15f
 
float sensitivity = 1.0f
 
bool invertYAxis = false
 
bool validateOverlaps = true
 

Detailed Description

Definition at line 80 of file InputDevice.h.

Constructor & Destructor Documentation

◆ InputProfile() [1/2]

InputProfile::InputProfile ( )
default

◆ InputProfile() [2/2]

InputProfile::InputProfile ( const std::string &  name,
InputDeviceType  type 
)
inline

Definition at line 83 of file InputDevice.h.

Member Function Documentation

◆ AddAction()

void InputProfile::AddAction ( const std::string &  actionName,
const InputBinding binding 
)
inline

Definition at line 101 of file InputDevice.h.

References actionMappings, and GetComponentTypeID_Static().

Referenced by InitializeDefaults().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetActionBinding()

const InputBinding * InputProfile::GetActionBinding ( const std::string &  actionName) const
inline

Definition at line 106 of file InputDevice.h.

References actionMappings, and GetComponentTypeID_Static().

+ Here is the call graph for this function:

◆ InitializeDefaults()

void InputProfile::InitializeDefaults ( )

Definition at line 64 of file InputDevice.cpp.

References AddAction(), Button, deviceType, GetComponentTypeID_Static(), Joystick, Key, KeyboardMouse, profileName, SYSTEM_LOG, and InputBinding::type.

+ Here is the call graph for this function:

◆ ValidateNoOverlaps()

bool InputProfile::ValidateNoOverlaps ( ) const

Definition at line 17 of file InputDevice.cpp.

References actionMappings, deviceType, GetComponentTypeID_Static(), Key, KeyboardMouse, profileName, SYSTEM_LOG, and validateOverlaps.

+ Here is the call graph for this function:

Member Data Documentation

◆ actionMappings

std::unordered_map<std::string, InputBinding> InputProfile::actionMappings

Definition at line 92 of file InputDevice.h.

Referenced by AddAction(), GetActionBinding(), and ValidateNoOverlaps().

◆ deadzone

float InputProfile::deadzone = 0.15f

Definition at line 95 of file InputDevice.h.

◆ description

std::string InputProfile::description

Definition at line 89 of file InputDevice.h.

◆ deviceType

InputDeviceType InputProfile::deviceType = InputDeviceType::None

Definition at line 88 of file InputDevice.h.

Referenced by InitializeDefaults(), and ValidateNoOverlaps().

◆ invertYAxis

bool InputProfile::invertYAxis = false

Definition at line 97 of file InputDevice.h.

◆ profileName

std::string InputProfile::profileName

Definition at line 87 of file InputDevice.h.

Referenced by InitializeDefaults(), and ValidateNoOverlaps().

◆ sensitivity

float InputProfile::sensitivity = 1.0f

Definition at line 96 of file InputDevice.h.

◆ validateOverlaps

bool InputProfile::validateOverlaps = true

Definition at line 98 of file InputDevice.h.

Referenced by ValidateNoOverlaps().


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