Flint Engine
Modular C++20 2D game engine powered by SDL3
Loading...
Searching...
No Matches
Flint::UIEvent Struct Reference

A normalized data packet containing translated input data routed down the UI node tree. More...

#include <flint/ui/ui-event.h>

+ Collaboration diagram for Flint::UIEvent:

Public Attributes

UIEventType type = UIEventType::None
 
UIInputSource source = UIInputSource::Unknown
 
Vec2f mousePosition {}
 
int mouseButton = 0
 
SDL_Keycode keycode
 

Detailed Description

A normalized data packet containing translated input data routed down the UI node tree.

Note
Generated exclusively by toUiEvent() from raw engine application hooks.
See also
toUiEvent, UIContext::handleEvent

Definition at line 51 of file ui-event.h.

Member Data Documentation

◆ keycode

SDL_Keycode Flint::UIEvent::keycode
Initial value:
=
SDLK_UNKNOWN

SDL key identifier code for keyboard stroke events.

Definition at line 57 of file ui-event.h.

◆ mouseButton

int Flint::UIEvent::mouseButton = 0

SDL index code of the active mouse button (if applicable).

Definition at line 56 of file ui-event.h.

◆ mousePosition

Vec2f Flint::UIEvent::mousePosition {}

Screen-space pixel coordinates of the cursor during the event.

Definition at line 55 of file ui-event.h.

◆ source

UIInputSource Flint::UIEvent::source = UIInputSource::Unknown

The physical hardware origin device.

Definition at line 53 of file ui-event.h.

◆ type

UIEventType Flint::UIEvent::type = UIEventType::None

The functional intent of the event.

Definition at line 52 of file ui-event.h.


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