Axmol 3.0.0-89d6d9a
Loading...
Searching...
No Matches
InputButton Struct Reference

Mouse / pen button indices. More...

#include <Event.h>

Public Types

enum  { None = -1 , Primary = 0 , Secondary , Tertiary , Left = Primary , Right = Secondary , Middle = Tertiary }

Detailed Description

Mouse / pen button indices.

This enum-like struct defines integer indices for common mouse/pen buttons. The values are intended to be used as button indices (0..n-1) when reporting which single button triggered an event. Use -1 to indicate "no button" (for example, touch events or pure move events).

Mapping convention:

  • 0 => left button
  • 1 => right button
  • 2 => middle button
  • n => additional buttons (if present) use subsequent indices
Note
Use the separate bitmask field (e.g., pressedButtons) to represent the current set of pressed buttons; bit i corresponds to button index i.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
None 

No button triggered (touch or no-button event).

Primary 

Primary button: mouse left / pen tip.

Secondary 

Secondary button: mouse right / pen barrel.

Tertiary 

Tertiary button: mouse middle / pen eraser.


The documentation for this struct was generated from the following file:
  • Event.h