vkmEngine 1.0.0
A C++ game engine · vkmengine.com
Loading...
Searching...
No Matches
Vkm::Engine::UIClickEvent Struct Reference

Fired when a UIButton is clicked (a press released over the same button). More...

#include <ui_events.h>

Public Attributes

EntityId entity
 The button entity that was clicked.
std::string eventId
 The clicked UIButton's eventId.

Detailed Description

Fired when a UIButton is clicked (a press released over the same button).

The UISystem enqueues this on the EventBus; it is delivered on the next flush, so a Behavior handles it exactly like any other gameplay event:

subscribe<UIClickEvent>([](const UIClickEvent& e) { if (e.eventId == "play") startGame(); });


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