#include "ComponentManager.h" #include "../api/Button.h" #include "../api/EventManager.h" #include "../api/Transform.h" #include "../api/Event.h" #include "system/InputSystem.h" using namespace crepe; InputSystem::InputSystem(ComponentManager &component_manager) : System(component_manager) { auto &event_manager = EventManager::get_instance(); event_manager.subscribe([this](const MouseClickEvent &event) { return this->handle_click(event); }); event_manager.subscribe([this](const MouseMoveEvent &event) { return this->handle_move(event); }); } void InputSystem::update() { } bool InputSystem::handle_click(const MouseClickEvent &event) { ComponentManager &mgr = this->component_manager; std::vector> buttons = mgr.get_components_by_type