cmdfx 0.2.0
Lightweight game engine for your terminal
Loading...
Searching...
No Matches
CmdFX_MouseEvent Struct Reference

The payload for the CMDFX_EVENT_MOUSE event. More...

#include <events.h>

Public Attributes

int button
 The button that was pressed, or -1 if no button was pressed.
 
int state
 Whether the button was pressed or released.
 
int prevX
 The previous x position of the mouse.
 
int x
 The x position of the mouse.
 
int prevY
 The previous y position of the mouse.
 
int y
 The y position of the mouse.
 

Detailed Description

The payload for the CMDFX_EVENT_MOUSE event.

Member Data Documentation

◆ button

int CmdFX_MouseEvent::button

The button that was pressed, or -1 if no button was pressed.

On most systems, the button values are as follows:

  • 0: Left mouse button
  • 1: Middle mouse button
  • 2: Right mouse button

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