22#include "guillaume/systems/surface_tone.hpp"
24#include "guillaume/theme.hpp"
48 .setElevationLevel(shadowLevel);
Main color of an entity: the fill of a shape, or the ink of a text or an icon.
Soft shadow drawn around an elevated surface.
State of a tonal surface: how high it sits above the background, and whether it casts a shadow.
bool hasShadow(void) const noexcept
Tell whether the surface casts a shadow.
Stores every component of a scene, per component type and per entity identifier, and knows which ones...
ComponentType & getComponent(const Entity::Identifier &entityIdentifier)
Get a component of an entity, to read or modify it.
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)
ecs::ComponentRegistry & getComponentRegistry(void)
Get the component registry of the scene being processed.
bool requireComponent(const ecs::Entity::Identifier &entityIdentifier)
Tell whether an entity has a component, and log a warning naming the entity and the component when it...
static void apply(ecs::ComponentRegistry &componentRegistry, const ecs::Entity::Identifier &entityIdentifier)
Write the color and the shadow of one surface from its components::SurfaceTone.
void update(const ecs::Entity::Identifier &entityIdentifier) override
Write the color and the shadow of one surface for this frame.
SurfaceTone(void)
Create the system in the Measure phase.
State. Every class here is plain data attached to an entity.
The entity-component-system core, independent of any widget.
Rules. Every class here runs each frame on the entities that have the components it declares.
@ Level0
Flat: no shadow, no tint.
utility::graphic::Color32Bit getElevatedSurfaceColor(theme::ElevationLevel level)
Get the background color of a surface raised to an elevation level.