Raven Engine v0.1
Loading...
Searching...
No Matches
Raven::MouseButtonPressedEvent Class Reference

Event triggered when a mouse button is pressed. More...

#include <MouseEvent.h>

Inheritance diagram for Raven::MouseButtonPressedEvent:
Raven::MouseButtonEvent Raven::Event

Public Member Functions

 MouseButtonPressedEvent (const MouseCode button)
 Constructs a MouseButtonPressedEvent with the specified button.
std::string ToString () const override
 Converts the MouseButtonPressedEvent to a string representation.
Public Member Functions inherited from Raven::MouseButtonEvent
MouseCode GetMouseButton () const
 Gets the mouse button associated with this event.
Public Member Functions inherited from Raven::Event
virtual ~Event ()=default
virtual EventType GetEventType () const =0
 Returns the runtime event type.
virtual const char * GetName () const =0
 Returns the name of the event.
virtual EventCategory GetCategoryFlags () const =0
 Returns the category flags of the event.
bool IsInCategory (EventCategory category) const
 Checks if the event belongs to the specified category.

Additional Inherited Members

Public Attributes inherited from Raven::Event
bool Handled = false
 Indicates whether the event has been handled.
Protected Member Functions inherited from Raven::MouseButtonEvent
 MouseButtonEvent (const MouseCode button)
 Constructs a MouseButtonEvent with the specified mouse button.
Protected Attributes inherited from Raven::MouseButtonEvent
MouseCode m_Button

Detailed Description

Event triggered when a mouse button is pressed.

This event is triggered when a mouse button is pressed down. It contains the button code for the pressed button.

Constructor & Destructor Documentation

◆ MouseButtonPressedEvent()

Raven::MouseButtonPressedEvent::MouseButtonPressedEvent ( const MouseCode button)
inline

Constructs a MouseButtonPressedEvent with the specified button.

Parameters
buttonThe mouse button code that was pressed.

Member Function Documentation

◆ ToString()

std::string Raven::MouseButtonPressedEvent::ToString ( ) const
inlinenodiscardoverridevirtual

Converts the MouseButtonPressedEvent to a string representation.

Returns
A string describing the MouseButtonPressedEvent with the button code. Event type for mouse button press

Reimplemented from Raven::Event.


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