R-Type  2
Doom but in better
Loading...
Searching...
No Matches
GUI::ECS::Systems::KeyMapper Class Reference

#include <Key.hpp>

Inheritance diagram for GUI::ECS::Systems::KeyMapper:
Inheritance graph
Collaboration diagram for GUI::ECS::Systems::KeyMapper:
Collaboration graph

Public Member Functions

 KeyMapper (const std::uint32_t EntityId=0)
 
const Key mapKey (const std::any &sfmlKey) const
 This is the function in charge of returning the internal key code equivalent for an sf::Keyboard::Scancode or sf::Keyboard::Key passed as an std::any.
 
const std::string stringKey (const std::any &keyCode) const
 This is the function that wan take either an sf::Keyboard::Key or a sf::Keyboard::Scancode and return the string equivalent.
 
const std::string stringKey (const GUI::ECS::Systems::Key &keyCode) const
 This is an overload to allow the program to know the equivalent keycode but as a string.
 
const std::string getInfo (const unsigned int indent=0) const
 This is a function meant for debugging purposes It will dump the current state of the variables upon call. It will dump them for itself and any of it's underlying classes.
 
- Public Member Functions inherited from GUI::ECS::EntityNode
 EntityNode (const size_t entityId=0)
 
virtual ~EntityNode ()=default
 
virtual size_t getEntityNodeId () const
 

Additional Inherited Members

- Protected Attributes inherited from GUI::ECS::EntityNode
size_t _entityID
 

Detailed Description

Definition at line 181 of file Key.hpp.

Constructor & Destructor Documentation

◆ KeyMapper()

GUI::ECS::Systems::KeyMapper::KeyMapper ( const std::uint32_t EntityId = 0)

Definition at line 163 of file Key.cpp.

Member Function Documentation

◆ getInfo()

const std::string GUI::ECS::Systems::KeyMapper::getInfo ( const unsigned int indent = 0) const

This is a function meant for debugging purposes It will dump the current state of the variables upon call. It will dump them for itself and any of it's underlying classes.

Parameters
indentThe level to which the class should be indented in the dump.
Returns
const std::string The formatted output.

Definition at line 454 of file Key.cpp.

◆ mapKey()

const GUI::ECS::Systems::Key GUI::ECS::Systems::KeyMapper::mapKey ( const std::any & sfmlKey) const

This is the function in charge of returning the internal key code equivalent for an sf::Keyboard::Scancode or sf::Keyboard::Key passed as an std::any.

Parameters
sfmlKey
Returns
const Key

Definition at line 416 of file Key.cpp.

◆ stringKey() [1/2]

const std::string GUI::ECS::Systems::KeyMapper::stringKey ( const GUI::ECS::Systems::Key & keyCode) const

This is an overload to allow the program to know the equivalent keycode but as a string.

Parameters
keyCodeThe internal key code
Returns
const std::string the string equivalent for human readability

Definition at line 445 of file Key.cpp.

◆ stringKey() [2/2]

const std::string GUI::ECS::Systems::KeyMapper::stringKey ( const std::any & keyCode) const

This is the function that wan take either an sf::Keyboard::Key or a sf::Keyboard::Scancode and return the string equivalent.

Parameters
keyCode
Returns
const std::string

Definition at line 440 of file Key.cpp.


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