23#include "guillaume/systems/text_input.hpp"
51 std::string content = text.getContent();
53 const auto committedText = textInputEvent->getText();
54 if (!committedText.empty()) {
55 content += committedText;
58 text.setContent(content);
std::size_t Identifier
The key under which an entity's components are stored. Systems and components refer to entities by th...
SystemFiller(Phase phase)
ComponentType & getComponent(const ecs::Entity::Identifier &entityIdentifier)
Get a component of an entity from the bound registry, to read or modify it.
Hands each engine event to the listeners subscribed to its type.
void consumeNextEvent(void)
EventManager(EventBus &eventBus)
std::shared_ptr< EventType > getLastEvent(void)
Decides which single entity has the keyboard focus.
void prepare(void) override
Take the next pending text input event, once per frame.
TextInput(event::EventBus &eventBus)
Create the system, in the Event phase, and subscribe it to text input events.
void cleanup(void) override
Does nothing.
virtual void update(const ecs::Entity::Identifier &entityIdentifier) override
Append the text of the current text input event to the content of one entity.
State. Every class here is plain data attached to an entity.
The entity-component-system core, independent of any widget.
Delivery of engine events to the systems that subscribed to them.
Rules. Every class here runs each frame on the entities that have the components it declares.