mouse

Functions

void update_mouse(struct mouse *mouse)

Query the current mouse state and update the passed mouse struct.

struct mouse
#include <mouse.h>

Public Members

bool left_click

Set to true if left click was detected

bool right_click

Set to true if right click was detected

bool middle_click

Set to true if middle click was detected

float x_position

Normalized value. 0.0 is the left edge of the screen. 1.0 is the right edge of the screen.

float y_position

Normalized value. 0.0 is the top edge of the screen. 1.0 is the bottom edge of the screen.