8#ifndef MALENA_CLICKABLE_H
9#define MALENA_CLICKABLE_H
57 void onClick(std::function<
void()> callback,
bool overwrite =
true);
69 void onClick(std::function<
void(
const std::optional<sf::Event>& event)> callback,
bool overwrite =
true);
77 bool occurred(
const std::optional<sf::Event>& event)
override;
78 bool filter(
const std::optional<sf::Event>& event,
Core* component)
override;
79 void fire(
const std::optional<sf::Event>& event)
override;
#define ML_EXPORT(ClassName)
Register a Malena type with the framework.
void onClick(std::function< void()> callback, bool overwrite=true)
Register a no-argument callback invoked when this component is clicked.
void onClick(std::function< void(const std::optional< sf::Event > &event)> callback, bool overwrite=true)
Register a callback invoked when this component is clicked, receiving the raw SFML event.
Virtual base class for all Malena framework objects.
Base class for all per-event dispatchers in the Malena event system.
Base class for all event-receiving traits.