Elaztek Developer Hub
Blamite Game Engine - Strings  00433.02.16.25.2127.blamite
A library containing general purpose utilities and classes for use in multiple projects.
MouseMoveEvent Class Reference

Class representing a mouse movement event. More...

#include <MouseMoveEvent.h>

+ Inheritance diagram for MouseMoveEvent:
+ Collaboration diagram for MouseMoveEvent:

Public Member Functions

 MouseMoveEvent (int _x, int _y)
 Constructs a new event. More...
 
 MouseMoveEvent (int _x, int _y, int _dx, int _dy)
 Constructs a new event. More...
 
int GetX ()
 Retrieves the X position of the mouse. More...
 
int GetY ()
 Retrieves the Y position of the mouse. More...
 
int GetDeltaX ()
 Retrieves the X delta of the mouse. More...
 
int GetDeltaY ()
 Retrieves the Y delta of the mouse. More...
 
- Public Member Functions inherited from BlamEvent
 BlamEvent (BlamEventType type)
 Constructs a new event with the specified type. More...
 
BlamEventType GetEventType ()
 Retrieves the type of the event. More...
 
void SetCancelled (bool cancel)
 Sets whether or not the event should be cancelled. More...
 
bool IsCancelled ()
 Determines whether or not the event has been cancelled. More...
 

Detailed Description

Class representing a mouse movement event.

This event is fired from the SDL_MOUSEMOTION event.

Constructor & Destructor Documentation

◆ MouseMoveEvent() [1/2]

MouseMoveEvent::MouseMoveEvent ( int  _x,
int  _y 
)

Constructs a new event.

Parameters
_x- The X position of the mouse.
_y- The Y position of the mouse.

◆ MouseMoveEvent() [2/2]

MouseMoveEvent::MouseMoveEvent ( int  _x,
int  _y,
int  _dx,
int  _dy 
)

Constructs a new event.

Parameters
_x- The X position of the mouse.
_y- The Y position of the mouse.
_dx- The X delta of the mouse.
_dy- The Y delta of the mouse.

Member Function Documentation

◆ GetDeltaX()

int MouseMoveEvent::GetDeltaX ( )

Retrieves the X delta of the mouse.

This refers to the distance, relative the screen center, that the mouse has moved. Only used when the mouse is captured.

Returns
The mouse X delta. If the mouse is not captured, this will always be 0.

◆ GetDeltaY()

int MouseMoveEvent::GetDeltaY ( )

Retrieves the Y delta of the mouse.

This refers to the distance, relative the screen center, that the mouse has moved. Only used when the mouse is captured.

Returns
The mouse Y delta. If the mouse is not captured, this will always be 0.

◆ GetX()

int MouseMoveEvent::GetX ( )

Retrieves the X position of the mouse.

Returns
The mouse X position.

◆ GetY()

int MouseMoveEvent::GetY ( )

Retrieves the Y position of the mouse.

Returns
The mouse Y position.

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