TinyLib 0.1.1
Loading...
Searching...
No Matches
tl::Mouse Class Reference

#include <Mouse.h>

Public Types

enum  { Left = VK_LBUTTON , Right = VK_RBUTTON , Middle = VK_MBUTTON }
 

Static Public Member Functions

static bit isHeld (u8)
 Check if a mouse button is currently down.
 
static Vec2i getPosition ()
 Get current position of the mouse cursor.
 
static bit intersects (Drawable &)
 Check if the mouse cursor is inside a drawable object.
 

Detailed Description

Definition at line 9 of file Mouse.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
Left 
Right 
Middle 

Definition at line 13 of file Mouse.h.

Member Function Documentation

◆ getPosition()

Vec2i tl::Mouse::getPosition ( )
static

Get current position of the mouse cursor.

Returns
X-position, Y-position.

Definition at line 19 of file Mouse.cpp.

◆ intersects()

bit tl::Mouse::intersects ( Drawable & other)
static

Check if the mouse cursor is inside a drawable object.

Parameters
otherDrawable to check.
Returns
True if the mouse cursor is pointed at the parameter.

Definition at line 34 of file Mouse.cpp.

◆ isHeld()

bit tl::Mouse::isHeld ( u8 button)
static

Check if a mouse button is currently down.

Parameters
buttonWhich mouse button to check.
Returns
True if that mouse button is down.

tl::Mouse has an enum for different mouse buttons.

Definition at line 11 of file Mouse.cpp.


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