nomlib
Loading...
Searching...
No Matches
nom::MouseButtonEvent Struct Reference

A structure containing information on a mouse button event. More...

#include <Event.hpp>

Public Attributes

uint32 id
 The mouse instance identifier, or SDL_TOUCH_MOUSEID.
int32 x
 The X coordinate, relative to the nom::Window instance.
int32 y
 The Y coordinate, relative to the nom::Window instance.
uint8 button
 The button's event type.
uint8 state
 The state of the button.
uint8 clicks
 Value containing how many mouse buttons were clicked.
uint32 window_id
 The identifier of the window at the moment of the event.

Detailed Description

A structure containing information on a mouse button event.

Definition at line 175 of file Event.hpp.

Member Data Documentation

◆ button

uint8 nom::MouseButtonEvent::button

The button's event type.

See also
nom::MouseButton.

Definition at line 195 of file Event.hpp.

◆ clicks

uint8 nom::MouseButtonEvent::clicks

Value containing how many mouse buttons were clicked.

Remarks
One (1) for single-click, two (2) for double-click, and so on.

Definition at line 205 of file Event.hpp.

◆ id

uint32 nom::MouseButtonEvent::id

The mouse instance identifier, or SDL_TOUCH_MOUSEID.

Remarks
'id' may be SDL_TOUCH_MOUSEID, for events that were generated by a touch input device, and not a real mouse. (You may want to ignore such events, if your application already handles SDL_TouchFingerEvent).
Note
ev->button.which

Definition at line 184 of file Event.hpp.

◆ state

uint8 nom::MouseButtonEvent::state

The state of the button.

See also
nom::InputState

Definition at line 200 of file Event.hpp.

◆ window_id

uint32 nom::MouseButtonEvent::window_id

The identifier of the window at the moment of the event.

Definition at line 208 of file Event.hpp.

◆ x

int32 nom::MouseButtonEvent::x

The X coordinate, relative to the nom::Window instance.

Definition at line 187 of file Event.hpp.

◆ y

int32 nom::MouseButtonEvent::y

The Y coordinate, relative to the nom::Window instance.

Definition at line 190 of file Event.hpp.


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