Global instance of the mouse state.
Global instance of the mouse state.This variable is updated automatically by the engine and provides access to the current mouse input.
if (gm_mouse.clicked) { // Mouse was just clicked } double mx = gm_mouse.position.x;
#pragma once
#include "position.h"
#include <stdint.h>
};
.position = {0, 0},
.lastPosition = {0, 0},
.movement = {0, 0},
.clicked = 0,
.down = 0,
};
struct _gmMouse gm_mouse
Definition mouse.h:32
Structure representing the current state of the mouse.
Definition mouse.h:12
uint8_t down
Definition mouse.h:18
gmPos position
Definition mouse.h:13
gmPos movement
Definition mouse.h:15
uint8_t clicked
Definition mouse.h:17
gmPos lastPosition
Definition mouse.h:14
Represents a 2D position or vector.
Definition position.h:8