Bubba-3D  0.9.0
Awesome game engine!
Public Member Functions | List of all members
MousePosition Class Reference

#include <MousePosition.h>

Public Member Functions

 MousePosition ()
 
void update ()
 
int getRawX ()
 
int getRawY ()
 
int getWindowX ()
 
int getWindowY ()
 
int getXMidOffset ()
 
int getYMidOffset ()
 

Detailed Description

A basic class which makes it easy to find the mouse position based on different relative views. Note that you have to create a new MousePosition object or call object to get the coordinates after the mouse has moved.

Definition at line 30 of file MousePosition.h.

Constructor & Destructor Documentation

MousePosition::MousePosition ( )

Fetches the current mouse position and stores it so it can be used with the get functions

Definition at line 26 of file MousePosition.cpp.

Member Function Documentation

int MousePosition::getRawX ( )

Returns the raw x position on the whole screen (not just the window)

Definition at line 38 of file MousePosition.cpp.

int MousePosition::getRawY ( )

Returns the raw y position on the whole screen (not just the window)

Definition at line 42 of file MousePosition.cpp.

int MousePosition::getWindowX ( )

Returns the x position relative to the left side of the window

Definition at line 46 of file MousePosition.cpp.

int MousePosition::getWindowY ( )

Returns the y position relative to the upper side of the window

Definition at line 50 of file MousePosition.cpp.

int MousePosition::getXMidOffset ( )

Gets the x offset from the window center.

Definition at line 54 of file MousePosition.cpp.

int MousePosition::getYMidOffset ( )

Gets the y offset from the window center.

Definition at line 58 of file MousePosition.cpp.

void MousePosition::update ( )

Fetches the current mouse position and stores it so it can be used with the get functions

Definition at line 30 of file MousePosition.cpp.


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