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

Event triggered when the mouse wheel is scrolled. More...

#include <MouseEvent.h>

Inheritance diagram for Raven::MouseScrolledEvent:
Raven::Event

Public Member Functions

 MouseScrolledEvent (const float xOffset, const float yOffset)
 Constructs a MouseScrolledEvent with the specified scroll offsets.
float GetXOffset () const
 Gets the horizontal scroll offset.
float GetYOffset () const
 Gets the vertical scroll offset.
std::string ToString () const override
 Converts the MouseScrolledEvent to a string representation.
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.

Detailed Description

Event triggered when the mouse wheel is scrolled.

This event is triggered when the user scrolls the mouse wheel. It contains the X and Y offset values which indicate how far the wheel was scrolled.

Constructor & Destructor Documentation

◆ MouseScrolledEvent()

Raven::MouseScrolledEvent::MouseScrolledEvent ( const float xOffset,
const float yOffset )
inline

Constructs a MouseScrolledEvent with the specified scroll offsets.

Parameters
xOffsetThe horizontal offset of the scroll.
yOffsetThe vertical offset of the scroll.

Member Function Documentation

◆ GetXOffset()

float Raven::MouseScrolledEvent::GetXOffset ( ) const
inlinenodiscard

Gets the horizontal scroll offset.

Returns
The X offset of the scroll.

◆ GetYOffset()

float Raven::MouseScrolledEvent::GetYOffset ( ) const
inlinenodiscard

Gets the vertical scroll offset.

Returns
The Y offset of the scroll.

◆ ToString()

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

Converts the MouseScrolledEvent to a string representation.

Returns
A string describing the MouseScrolledEvent with the X and Y offsets. Event type for mouse scrolling Event category for mouse input

Reimplemented from Raven::Event.


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