QuasarEngine
Cross-platform 3D engine and editor
Loading...
Searching...
No Matches
Quasar::MouseMovedEvent Class Referencefinal

Sent when the cursor moves over the window. More...

#include <quasar/events/MouseEvent.h>

Inheritance diagram for Quasar::MouseMovedEvent:
Quasar::EventOf< EventType::MouseMoved, EventCategory::Input|EventCategory::Mouse > Quasar::Event

Public Member Functions

 MouseMovedEvent (float x, float y)
 Creates the event with the new position of the cursor, in screen coordinates.
float GetX () const
 Returns the horizontal position of the cursor, from the left edge of the drawing area.
float GetY () const
 Returns the vertical position of the cursor, from the top edge of the drawing area.
std::string ToString () const override
 Returns the event with the position, for example "MouseMoved: 640, 360.5".
Public Member Functions inherited from Quasar::EventOf< EventType::MouseMoved, EventCategory::Input|EventCategory::Mouse >
EventType GetType () const override
 Returns the type of the event.
EventCategory GetCategories () const override
 Returns all the categories of the event.
Public Member Functions inherited from Quasar::Event
const char * GetName () const
 Returns the name of the type of the event, for example "KeyPressed".
bool IsInCategory (EventCategory category) const
 Returns true if the event belongs to the given category.
bool IsHandled () const
 Returns true if the event was handled.
void SetHandled (bool handled)
 Marks the event as handled, or not handled.

Additional Inherited Members

Static Public Member Functions inherited from Quasar::EventOf< EventType::MouseMoved, EventCategory::Input|EventCategory::Mouse >
static constexpr EventType GetStaticType ()
 Returns the type of this event class.
Protected Member Functions inherited from Quasar::Event
 Event ()=default
 Creates an event that is not handled.

Detailed Description

Sent when the cursor moves over the window.

The position is in screen coordinates, from the top-left corner of the drawing area. On a scaled display, for example at 150%, screen coordinates are not pixels: the same position in pixels is larger.

Member Function Documentation

◆ ToString()

std::string Quasar::MouseMovedEvent::ToString ( ) const
inlineoverridevirtual

Returns the event with the position, for example "MouseMoved: 640, 360.5".

Reimplemented from Quasar::Event.


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