27#include "guillaume/ecs/system_filler.hpp"
29#include "guillaume/components/dialog.hpp"
30#include "guillaume/theme.hpp"
Stores every component of a scene, per component type and per entity identifier, and knows which ones...
std::size_t Identifier
The key under which an entity's components are stored. Systems and components refer to entities by th...
The base class to derive a system from: a System whose signature is the list of component types given...
static void apply(ecs::ComponentRegistry &componentRegistry, const ecs::Entity::Identifier &entityIdentifier)
Style one dialog, arrange its children and place its backdrop.
static void dismiss(ecs::ComponentRegistry &componentRegistry, const ecs::Entity::Identifier &entityIdentifier)
Close the dialog as the user would with Escape or a click outside.
static void hide(ecs::ComponentRegistry &componentRegistry, const ecs::Entity::Identifier &entityIdentifier)
Hide the dialog and its backdrop without telling anyone.
static constexpr float Padding
Space between the edge of the panel and its content: 24 dp.
static void pressAction(ecs::ComponentRegistry &componentRegistry, const ecs::Entity::Identifier &entityIdentifier, std::size_t index)
Activate an action as a press on its button would.
static void installTitle(ecs::ComponentRegistry &componentRegistry, const ecs::Entity::Identifier &entityIdentifier)
Expose the title child to assistive technology as a header.
static void install(ecs::ComponentRegistry &componentRegistry, const ecs::Entity::Identifier &entityIdentifier)
Give a dialog panel its accessibility semantics.
static constexpr float Spacing
Gap between two stacked sections of the dialog: 16 dp.
void update(const ecs::Entity::Identifier &entityIdentifier) override
Run apply() on one dialog; called by the frame loop.
static void show(ecs::ComponentRegistry &componentRegistry, const ecs::Entity::Identifier &entityIdentifier)
Show the dialog and its backdrop.
~Dialog(void) override=default
Default destructor.
Dialog(void)
Create the system in the Layout phase.
static constexpr float get(unsigned int steps)
Get a spacing as a number of grid units.
Rules. Every class here runs each frame on the entities that have the components it declares.