Vesper 0.5.1
Vesper is short form for the Latin word for "Bat", as Vesper is designed to be small, lightweight, and easily handle things like particles and flocking behaviors in accordance with the nature of bats. \n It is meant to be a particle simulation, VFX editor, and CAN be used secondarily as a small game engine.
GitHub | Vesper Updates | Creator
Loading...
Searching...
No Matches
Vesper::MouseButtonEvent Class Reference

Base class for mouse button events. More...

#include <MouseEvent.h>

Inheritance diagram for Vesper::MouseButtonEvent:
Vesper::Event Vesper::MouseButtonPressedEvent Vesper::MouseButtonReleasedEvent

Public Member Functions

int GetMouseButton () const
 Get the mouse button associated with the event.
Public Member Functions inherited from Vesper::Event
virtual ~Event ()=default
virtual EventType GetEventType () const =0
 Get the type of the event.
virtual const char * GetName () const =0
 Get the name of the event.
virtual int GetCategoryFlags () const =0
 Get the category flags of the event.
virtual std::string ToString () const
 Convert the event to a string representation.
bool IsInCategory (EventCategory category)
 Check if the event is in a specific category.

Protected Member Functions

 MouseButtonEvent (int button)
 Construct a MouseButtonEvent with the specified button.

Protected Attributes

int m_Button

Additional Inherited Members

Public Attributes inherited from Vesper::Event
bool Handled = false
 Indicates whether the event has been handled.

Detailed Description

Base class for mouse button events.

Constructor & Destructor Documentation

◆ MouseButtonEvent()

Vesper::MouseButtonEvent::MouseButtonEvent ( int button)
inlineprotected

Construct a MouseButtonEvent with the specified button.

Parameters
buttonThe mouse button associated with the event. Restricted specific construction to derived classes.
93 : m_Button(button) {
94 }
int m_Button
Definition MouseEvent.h:95

References m_Button.

Referenced by Vesper::MouseButtonPressedEvent::MouseButtonPressedEvent(), and Vesper::MouseButtonReleasedEvent::MouseButtonReleasedEvent().

Member Function Documentation

◆ GetMouseButton()

int Vesper::MouseButtonEvent::GetMouseButton ( ) const
inline

Get the mouse button associated with the event.

84{ return m_Button; }

References m_Button.

Referenced by Vesper::MouseButtonPressedEvent::ToString(), and Vesper::MouseButtonReleasedEvent::ToString().

Member Data Documentation

◆ m_Button

int Vesper::MouseButtonEvent::m_Button
protected

Referenced by GetMouseButton(), and MouseButtonEvent().


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