R-TYPE
Public Member Functions | List of all members
Events Class Reference

#include <Events.hpp>

Public Member Functions

 Events ()=default
 
 ~Events ()=default
 
std::deque< ButtongetEventType (const sf::Event &event) const
 
std::string getTextEntered (const sf::Event &event) const
 
Mouse getEventTypeMouse (const sf::Event &event) const
 

Constructor & Destructor Documentation

◆ Events()

Events::Events ( )
default

◆ ~Events()

Events::~Events ( )
default

Member Function Documentation

◆ getEventType()

std::deque< Button > Events::getEventType ( const sf::Event &  event) const

If the event type is a key press, and the key pressed is in the map, return the value of the key pressed in the map

Parameters
eventThe event to check.
Returns
the Button type.

◆ getEventTypeMouse()

Mouse Events::getEventTypeMouse ( const sf::Event &  event) const

If the event type is a mouse button release, and the mouse button is in the map, return the mapped value, otherwise return None

Parameters
eventThe event to check.
Returns
The event type of the mouse.

◆ getTextEntered()

std::string Events::getTextEntered ( const sf::Event &  event) const

If the event is a text entered event, and the unicode value is a valid ASCII character, return the character as a string

Parameters
eventThe event to check.
Returns
A string of the character that was entered.

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