25#include "guillaume/ecs/system_filler.hpp"
27#include "guillaume/components/badge.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)
Size and color one badge and its label.
static void fade(ecs::ComponentRegistry &componentRegistry, const ecs::Entity::Identifier &entityIdentifier, float progress)
Move the visibility fade to a given progress and restyle.
void update(const ecs::Entity::Identifier &entityIdentifier) override
Run apply() on one badge; called by the frame loop.
static void setVisible(ecs::ComponentRegistry &componentRegistry, const ecs::Entity::Identifier &entityIdentifier, bool visible)
Show or hide the badge with a fade.
~Badge(void) override=default
Default destructor.
static float sizeOf(const ecs::ComponentRegistry &componentRegistry, const ecs::Entity::Identifier &entityIdentifier)
Get the height of a badge, in dp.
Badge(void)
Create the system in the Layout phase.
static void install(ecs::ComponentRegistry &componentRegistry, const ecs::Entity::Identifier &entityIdentifier)
Prepare the visibility fade of a badge.
static bool needsLabel(const ecs::ComponentRegistry &componentRegistry, const ecs::Entity::Identifier &entityIdentifier)
Whether the badge should have a label child.
Rules. Every class here runs each frame on the entities that have the components it declares.