SleakEngine 1.0.0
C++23 multi-backend game engine
Loading...
Searching...
No Matches
Sleak::Events::Input::MouseButtonEvent Class Reference

#include <MouseEvent.hpp>

Inheritance diagram for Sleak::Events::Input::MouseButtonEvent:

Public Member Functions

std::string GetButtonStr () const
virtual int GetCategoryFlags () const override
MouseCode GetMouseButton () const
std::string ToString () const override
Public Member Functions inherited from Sleak::Event
 Event ()
virtual ~Event ()=default
virtual EventType GetEventType () const =0
virtual const char * GetName () const =0
bool IsInCategory (EventCategory category)

Protected Member Functions

 MouseButtonEvent (const MouseCode button, int x, int y)

Protected Attributes

MouseCode m_Button
int mouseX
int mouseY

Additional Inherited Members

Public Attributes inherited from Sleak::Event
bool Handled = false

Detailed Description

Common base for button events; carries the button and cursor position at the time.

Definition at line 60 of file MouseEvent.hpp.

Constructor & Destructor Documentation

◆ MouseButtonEvent()

Sleak::Events::Input::MouseButtonEvent::MouseButtonEvent ( const MouseCode button,
int x,
int y )
inlineprotected

Definition at line 76 of file MouseEvent.hpp.

Member Function Documentation

◆ GetButtonStr()

std::string Sleak::Events::Input::MouseButtonEvent::GetButtonStr ( ) const
inline

Definition at line 64 of file MouseEvent.hpp.

◆ GetCategoryFlags()

virtual int Sleak::Events::Input::MouseButtonEvent::GetCategoryFlags ( ) const
inlineoverridevirtual

Implements Sleak::Event.

Definition at line 74 of file MouseEvent.hpp.

◆ GetMouseButton()

MouseCode Sleak::Events::Input::MouseButtonEvent::GetMouseButton ( ) const
inline

Definition at line 63 of file MouseEvent.hpp.

◆ ToString()

std::string Sleak::Events::Input::MouseButtonEvent::ToString ( ) const
inlineoverridevirtual

Reimplemented from Sleak::Event.

Definition at line 66 of file MouseEvent.hpp.

Member Data Documentation

◆ m_Button

MouseCode Sleak::Events::Input::MouseButtonEvent::m_Button
protected

Definition at line 79 of file MouseEvent.hpp.

◆ mouseX

int Sleak::Events::Input::MouseButtonEvent::mouseX
protected

Definition at line 80 of file MouseEvent.hpp.

◆ mouseY

int Sleak::Events::Input::MouseButtonEvent::mouseY
protected

Definition at line 80 of file MouseEvent.hpp.