restructure project for dynamic linking

This commit is contained in:
2025-02-26 12:12:31 -06:00
parent ca683b50e7
commit 1922896a1a
40 changed files with 11 additions and 0 deletions

35
modules/gui/layers/layer.h Executable file
View File

@@ -0,0 +1,35 @@
#pragma once
#include "engine.h"
#include "event.h"
class Layer {
friend class EventHandler;
public:
Layer();
virtual ~Layer();
virtual void onAttach() = 0;
virtual void onDetach() = 0;
virtual void onUpdate() = 0;
virtual bool onEvent(const Event* event) = 0;
protected:
virtual bool onMouseButtonPressed(const MouseButtonEvent* event) = 0;
virtual bool onMouseButtonReleased(const MouseButtonEvent* event) = 0;
virtual bool onMouseMoved(const MouseMovedEvent* event) = 0;
virtual bool onMouseScrolled(const MouseScrolledEvent* event) = 0;
virtual bool onKeyPressed(const KeyEvent* event) = 0;
virtual bool onKeyReleased(const KeyEvent* event) = 0;
virtual bool onKeyTyped(const KeyTypedEvent* event) = 0;
virtual bool onWindowResize(const WindowEvent* event) = 0;
virtual bool onWindowFocus(const WindowEvent* event) = 0;
virtual bool onWindowFocusLost(const WindowEvent* event) = 0;
virtual bool onWindowClose(const WindowEvent* event) = 0;
virtual bool onWindowMoved(const WindowEvent* event) = 0;
};