Calamity Engine 1.0.0
A cross-platform 2D game engine written in C++ and SDL3.
Loading...
Searching...
No Matches
InputEventMouseButton Class Reference

#include <input.hpp>

Inheritance diagram for InputEventMouseButton:
InputEventMouse InputEventWithModifiers InputEvent

Public Member Functions

bool operator== (const InputEvent &other) const
 
bool operator<= (const InputEvent &other) const
 
bool isPressed () const
 
bool isReleased () const
 
float getStrength () const
 
- Public Member Functions inherited from InputEventWithModifiers
std::vector< bool > getModifiersMask () const
 
bool isCommandOrControlPressed () const
 
- Public Member Functions inherited from InputEvent
virtual ~InputEvent ()=default
 
bool isActionPressed (const std::string &action) const
 
bool isActionReleased (const std::string &action) const
 
bool isAction (const std::string &action) const
 

Public Attributes

MouseButton button = MouseButton::NONE
 
bool doubleClick = false
 
Vector2 factor = {0, 0}
 
bool pressed = false
 
- Public Attributes inherited from InputEventMouse
Vector2 position = {0, 0}
 
Vector2 relative = {0, 0}
 
- Public Attributes inherited from InputEventWithModifiers
bool altPressed = false
 
bool commandOrControlAutoremap = false
 
bool ctrlPressed = false
 
bool metaPressed = false
 
bool shiftPressed = false
 

Member Function Documentation

◆ getStrength()

float InputEventMouseButton::getStrength ( ) const
inlinevirtual

Reimplemented from InputEvent.

◆ isPressed()

bool InputEventMouseButton::isPressed ( ) const
inlinevirtual

Reimplemented from InputEvent.

◆ isReleased()

bool InputEventMouseButton::isReleased ( ) const
inlinevirtual

Reimplemented from InputEvent.

◆ operator<=()

bool InputEventMouseButton::operator<= ( const InputEvent other) const
virtual

Reimplemented from InputEvent.

◆ operator==()

bool InputEventMouseButton::operator== ( const InputEvent other) const
virtual

Reimplemented from InputEvent.

Member Data Documentation

◆ button

MouseButton InputEventMouseButton::button = MouseButton::NONE

◆ doubleClick

bool InputEventMouseButton::doubleClick = false

◆ factor

Vector2 InputEventMouseButton::factor = {0, 0}

◆ pressed

bool InputEventMouseButton::pressed = false

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