![]() |
R-Type
2
Doom but in better
|
#include <MouseInfo.hpp>
Public Member Functions | |
MouseInfo (const std::uint32_t entityId=0) | |
Constructs a new MouseInfo object with default values. | |
~MouseInfo () | |
Destroys the MouseInfo object. | |
void | update (const std::any &event) |
Processes and updates the internal state based on a given sf::Event. | |
void | update (const MouseInfo &entity) |
Update the values of the class with the content of another class. | |
void | update (const std::pair< int, int > &position) |
Updates the mouse position using an integer-based vector. | |
const std::pair< int, int > | getMousePosition () const |
Retrieves the current mouse position. | |
const bool | isMouseInFocus () const |
Checks if the mouse is in the window. | |
const bool | isMouseLeftButtonClicked () const |
Checks if the left mouse button is pressed. | |
const bool | isMouseMiddleButtonClicked () const |
Checks if the middle mouse button is pressed. | |
const bool | isMouseRightButtonClicked () const |
Checks if the right mouse button is pressed. | |
const bool | isMouseExtra1ButtonClicked () const |
Checks if the extra1 mouse button is pressed. | |
const bool | isMouseExtra2ButtonClicked () const |
Checks if the extra2 mouse button is pressed. | |
const bool | isMouseWheelScrolled () const |
Check if the mouse has scrolled. | |
const bool | isMouseWheelScrolledUp () const |
Check if the mouse has scrolled upwards. | |
const bool | isMouseWheelScrolledDown () const |
Check if the mouse has scrolled downwards. | |
const bool | isMouseWheelScrolledLeft () const |
Check if the mouse has scrolled to the left. | |
const bool | isMouseWheelScrolledRight () const |
Check if the mouse has scrolled to the right. | |
const float | getScrollIndex () const |
Function in charge of returning the scroll index of the mouse. | |
const MouseWheel | getScrollDirection () const |
Function in charge of returning the direction in which the user scrolled. | |
const int | getPositionX () const |
Retrieves the x-coordinate of the mouse position. | |
const int | getPositionY () const |
Retrieves the y-coordinate of the mouse position. | |
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. | |
void | clear () |
Resets the internal state of the MouseInfo object. | |
MouseInfo & | operator= (const GUI::ECS::Systems::MouseInfo ©) |
Update the content of the class using the '=' sign overloader. | |
![]() | |
EntityNode (const size_t entityId=0) | |
virtual | ~EntityNode ()=default |
virtual size_t | getEntityNodeId () const |
Additional Inherited Members | |
![]() | |
size_t | _entityID |
Definition at line 40 of file MouseInfo.hpp.
GUI::ECS::Systems::MouseInfo::MouseInfo | ( | const std::uint32_t | entityId = 0 | ) |
Constructs a new MouseInfo object with default values.
Definition at line 19 of file MouseInfo.cpp.
GUI::ECS::Systems::MouseInfo::~MouseInfo | ( | ) |
Destroys the MouseInfo object.
Definition at line 31 of file MouseInfo.cpp.
void GUI::ECS::Systems::MouseInfo::clear | ( | ) |
Resets the internal state of the MouseInfo object.
Definition at line 393 of file MouseInfo.cpp.
const std::string GUI::ECS::Systems::MouseInfo::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.
indent | The level to which the class should be indented in the dump. |
Definition at line 359 of file MouseInfo.cpp.
const std::pair< int, int > GUI::ECS::Systems::MouseInfo::getMousePosition | ( | ) | const |
Retrieves the current mouse position.
Definition at line 179 of file MouseInfo.cpp.
const int GUI::ECS::Systems::MouseInfo::getPositionX | ( | ) | const |
Retrieves the x-coordinate of the mouse position.
Definition at line 343 of file MouseInfo.cpp.
const int GUI::ECS::Systems::MouseInfo::getPositionY | ( | ) | const |
Retrieves the y-coordinate of the mouse position.
Definition at line 353 of file MouseInfo.cpp.
const GUI::ECS::Systems::MouseWheel GUI::ECS::Systems::MouseInfo::getScrollDirection | ( | ) | const |
Function in charge of returning the direction in which the user scrolled.
Definition at line 329 of file MouseInfo.cpp.
const float GUI::ECS::Systems::MouseInfo::getScrollIndex | ( | ) | const |
Function in charge of returning the scroll index of the mouse.
Definition at line 319 of file MouseInfo.cpp.
const bool GUI::ECS::Systems::MouseInfo::isMouseExtra1ButtonClicked | ( | ) | const |
Checks if the extra1 mouse button is pressed.
Definition at line 229 of file MouseInfo.cpp.
const bool GUI::ECS::Systems::MouseInfo::isMouseExtra2ButtonClicked | ( | ) | const |
Checks if the extra2 mouse button is pressed.
Definition at line 239 of file MouseInfo.cpp.
const bool GUI::ECS::Systems::MouseInfo::isMouseInFocus | ( | ) | const |
Checks if the mouse is in the window.
Definition at line 189 of file MouseInfo.cpp.
const bool GUI::ECS::Systems::MouseInfo::isMouseLeftButtonClicked | ( | ) | const |
Checks if the left mouse button is pressed.
Definition at line 199 of file MouseInfo.cpp.
const bool GUI::ECS::Systems::MouseInfo::isMouseMiddleButtonClicked | ( | ) | const |
Checks if the middle mouse button is pressed.
Definition at line 209 of file MouseInfo.cpp.
const bool GUI::ECS::Systems::MouseInfo::isMouseRightButtonClicked | ( | ) | const |
Checks if the right mouse button is pressed.
Definition at line 219 of file MouseInfo.cpp.
const bool GUI::ECS::Systems::MouseInfo::isMouseWheelScrolled | ( | ) | const |
Check if the mouse has scrolled.
Definition at line 250 of file MouseInfo.cpp.
const bool GUI::ECS::Systems::MouseInfo::isMouseWheelScrolledDown | ( | ) | const |
Check if the mouse has scrolled downwards.
Definition at line 278 of file MouseInfo.cpp.
const bool GUI::ECS::Systems::MouseInfo::isMouseWheelScrolledLeft | ( | ) | const |
Check if the mouse has scrolled to the left.
Definition at line 292 of file MouseInfo.cpp.
const bool GUI::ECS::Systems::MouseInfo::isMouseWheelScrolledRight | ( | ) | const |
Check if the mouse has scrolled to the right.
Definition at line 306 of file MouseInfo.cpp.
const bool GUI::ECS::Systems::MouseInfo::isMouseWheelScrolledUp | ( | ) | const |
Check if the mouse has scrolled upwards.
Definition at line 264 of file MouseInfo.cpp.
GUI::ECS::Systems::MouseInfo & GUI::ECS::Systems::MouseInfo::operator= | ( | const GUI::ECS::Systems::MouseInfo & | copy | ) |
Update the content of the class using the '=' sign overloader.
copy |
Definition at line 416 of file MouseInfo.cpp.
void GUI::ECS::Systems::MouseInfo::update | ( | const MouseInfo & | entity | ) |
Update the values of the class with the content of another class.
entity |
Definition at line 144 of file MouseInfo.cpp.
void GUI::ECS::Systems::MouseInfo::update | ( | const std::any & | eventCapsule | ) |
Processes and updates the internal state based on a given sf::Event.
event | The SFML event to process. |
Definition at line 38 of file MouseInfo.cpp.
void GUI::ECS::Systems::MouseInfo::update | ( | const std::pair< int, int > & | mousePosition | ) |
Updates the mouse position using an integer-based vector.
mousePosition | The new mouse position as an std::pair<int, int>. |
Definition at line 167 of file MouseInfo.cpp.