#include "baseLayer.h" #include "application.h" BaseLayer::BaseLayer() { } BaseLayer::~BaseLayer() { } void BaseLayer::onAttach() { } void BaseLayer::onDetach() { } void BaseLayer::onUpdate() { } bool BaseLayer::onEvent(const Event* e) { EventHandler eh; return eh.handleEvent(e, this); } bool BaseLayer::onMouseButtonPressed(const MouseButtonEvent *e) { return true; } bool BaseLayer::onMouseButtonReleased(const MouseButtonEvent *e) { App::Get().show = !App::Get().show; return true; } bool BaseLayer::onMouseMoved(const MouseMovedEvent *e) { return true; } bool BaseLayer::onMouseScrolled(const MouseScrolledEvent *e) { return true; } bool BaseLayer::onKeyPressed(const KeyEvent *e) { return true; } bool BaseLayer::onKeyReleased(const KeyEvent *e) { return true; } bool BaseLayer::onKeyTyped(const KeyTypedEvent *) { return true; } bool BaseLayer::onWindowClose(const WindowEvent *e) { if (e->getWindowID() == SDL_GetWindowID(App::Get().getWindow())) { App::Get().done = true; } return true; } bool BaseLayer::onWindowFocus(const WindowEvent *e) { return true; } bool BaseLayer::onWindowFocusLost(const WindowEvent *e) { return true; } bool BaseLayer::onWindowMoved(const WindowEvent *e) { return true; } bool BaseLayer::onWindowResize(const WindowEvent *e) { return true; }