Carpenter Engine
A C++ game engine with a build once run anywhere solution
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
Engine::Input::Mouse Class Reference

Singleton class used to handle mouse input. More...

#include <Mouse.hpp>

Public Member Functions

void AddListener (Input *input)
 
void RemoveListener (Input *input)
 
Vec2f GetPosition ()
 Returns the position of the mouse.
 

Static Public Member Functions

static MouseGetInstance ()
 Returns the singleton instance.
 

Detailed Description

Singleton class used to handle mouse input.

This class is primarily used to return the current position of the mouse. If you want to listen for mouse button events, use the InputManager instead.

Member Function Documentation

◆ AddListener()

void Engine::Input::Mouse::AddListener ( Input input)

@biref Adds an input listener to the mouse

Parameters
inputReference to the input to add

◆ GetPosition()

Engine::Vec2f Engine::Input::Mouse::GetPosition ( )

Returns the position of the mouse.

Returns
The X and Y coordinates of the mouse from the top left of the window.

◆ RemoveListener()

void Engine::Input::Mouse::RemoveListener ( Input input)

Removes an input listener

Parameters
inputReference to the input to remove

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