libtcod
Loading...
Searching...
No Matches
TCOD_mouse_t Struct Reference

Mouse state provided by the libtcod event system. More...

#include <mouse_types.h>

Public Attributes

int x
 The mouse absolute pixel position, according to SDL.
int y
int dx
 The mouse relative pixel motion, according to SDL.
int dy
int cx
 The mouse cell coordinates for the root console or the last presented console.
int cy
int dcx
 The mouse cell movement for the root console or the last presented console.
int dcy
bool lbutton
 True when the Left mouse button is held.
bool rbutton
 True when the right mouse button is held.
bool mbutton
 True when the middle mouse button is held.
bool lbutton_pressed
 True when the left mouse button has just been released.
bool rbutton_pressed
 True when the right mouse button has just been released.
bool mbutton_pressed
 True when the middle mouse button has just been released.
bool wheel_up
 True when the mouse wheel was rolled up.
bool wheel_down
 True when the mouse wheel was rolled down.

Detailed Description

Mouse state provided by the libtcod event system.

This may be a moved, pressed, or released event.

Deprecated
The libtcod mouse state has several known issues such as missing or broken functionality. In its current state it exists only for backwards compatibility. These issues should be resolved by using SDL directly for mouse and keyboard events.

Member Data Documentation

◆ wheel_down

bool TCOD_mouse_t::wheel_down

True when the mouse wheel was rolled down.

Multiple scroll events per frame are lost.

◆ wheel_up

bool TCOD_mouse_t::wheel_up

True when the mouse wheel was rolled up.

Multiple scroll events per frame are lost.


The documentation for this struct was generated from the following file: