27#include <utility/graphic/color.hpp>
29#include "guillaume/components/accessibility.hpp"
30#include "guillaume/ecs/component_registry.hpp"
31#include "guillaume/ecs/entity.hpp"
33namespace guillaume::systems::interaction
95 std::function<
void(
void)> onPress,
96 std::function<
void(
void)> onStateChange = {});
111 void setEnabled(ecs::ComponentRegistry ®istry,
122 bool isEnabled(
const ecs::ComponentRegistry ®istry,
135 bool isHovered(
const ecs::ComponentRegistry ®istry,
149 bool isPressed(
const ecs::ComponentRegistry ®istry,
181 utility::graphic::Color32Bit
184 const utility::graphic::Color32Bit &base,
185 const utility::graphic::Color32Bit &content);
std::size_t Identifier
The key under which an entity's components are stored. Systems and components refer to entities by th...
AccessibilityRole
What an entity is for a screen reader or another assistive technology. The values mirror react-native...
bool isPressed(const ecs::ComponentRegistry ®istry, const ecs::Entity::Identifier &entityIdentifier)
Whether an entity is being pressed.
bool isHovered(const ecs::ComponentRegistry ®istry, const ecs::Entity::Identifier &entityIdentifier)
Whether the mouse pointer or a hand is over an entity.
bool isEnabled(const ecs::ComponentRegistry ®istry, const ecs::Entity::Identifier &entityIdentifier)
Whether an entity accepts input.
void makeInteractive(ecs::ComponentRegistry ®istry, const ecs::Entity::Identifier &entityIdentifier, components::AccessibilityRole role, std::function< void(void)> onPress, std::function< void(void)> onStateChange={})
Make an entity hoverable, pressable and focusable.
void setEnabled(ecs::ComponentRegistry ®istry, const ecs::Entity::Identifier &entityIdentifier, bool enabled)
Enable or disable an entity.
utility::graphic::Color32Bit stateLayerColor(const ecs::ComponentRegistry ®istry, const ecs::Entity::Identifier &entityIdentifier, const utility::graphic::Color32Bit &base, const utility::graphic::Color32Bit &content)
Container color of a widget in its current input state.