25#include <utility/graphic/color.hpp>
27#include "guillaume/ecs/system_filler.hpp"
29#include "guillaume/components/loading_indicator.hpp"
195 static utility::graphic::Color32Bit
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 installChildren(ecs::ComponentRegistry &componentRegistry, const ecs::Entity::Identifier &entityIdentifier)
Wire the looping animation of the animated child and start it.
static void startFade(ecs::ComponentRegistry &componentRegistry, const ecs::Entity::Identifier &entityIdentifier)
Start fading towards the opacity the running state calls for.
static bool isRunning(const ecs::ComponentRegistry &componentRegistry, const ecs::Entity::Identifier &entityIdentifier)
Whether the looping animation is running.
static void install(ecs::ComponentRegistry &componentRegistry, const ecs::Entity::Identifier &entityIdentifier)
Give a loading indicator its accessibility role and its fade.
void update(const ecs::Entity::Identifier &entityIdentifier) override
Run apply() on one loading indicator; called by the frame loop.
LoadingIndicator(void)
Create the system in the Layout phase.
~LoadingIndicator(void) override=default
Default destructor.
static float strokeWidth(const ecs::ComponentRegistry &componentRegistry, const ecs::Entity::Identifier &entityIdentifier)
Get the stroke width of the circular arc, in dp.
static utility::graphic::Color32Bit indicatorColor(const ecs::ComponentRegistry &componentRegistry, const ecs::Entity::Identifier &entityIdentifier)
Get the color of the arc or bar at full opacity.
static void stop(ecs::ComponentRegistry &componentRegistry, const ecs::Entity::Identifier &entityIdentifier)
Stop the looping animation.
static void start(ecs::ComponentRegistry &componentRegistry, const ecs::Entity::Identifier &entityIdentifier)
Start the looping animation and fade the indicator in.
static void apply(ecs::ComponentRegistry &componentRegistry, const ecs::Entity::Identifier &entityIdentifier)
Size one loading indicator and draw its animated child at the current loop progress and opacity.
Rules. Every class here runs each frame on the entities that have the components it declares.