diff options
author | rtk0c <[email protected]> | 2022-04-08 22:30:12 -0700 |
---|---|---|
committer | rtk0c <[email protected]> | 2022-04-08 22:30:12 -0700 |
commit | e7ef3f208c109357538b1f68af10bcd78db95c95 (patch) | |
tree | 066d614ae0f079e53602d7c0fd972998c546c8c1 /source/App.hpp | |
parent | f163e8f37123e651ea80b690793845b31ddb8639 (diff) |
Changeset: 3 More work
Diffstat (limited to 'source/App.hpp')
-rw-r--r-- | source/App.hpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/source/App.hpp b/source/App.hpp index 5a701d0..b861730 100644 --- a/source/App.hpp +++ b/source/App.hpp @@ -1,5 +1,6 @@ #pragma once +#include "EditorCoreAPI.hpp" #include "Player.hpp" #include "PodVector.hpp" #include "World.hpp" @@ -7,18 +8,30 @@ #define GLFW_INCLUDE_NONE #include <GLFW/glfw3.h> +#include <deque> +#include <functional> #include <memory> #include <vector> +using KeyCaptureCallback = std::function<bool(int, int)>; + class App { private: + std::deque<KeyCaptureCallback> mKeyCaptureCallbacks; PodVector<Player*> mPlayers; + EditorInstance* mEditor; std::unique_ptr<GameWorld> mCurrentWorld; + bool mEditorShown = true; + bool mInitialized = false; public: void Init(); void Shutdown(); void Show(); + void HandleMouse(int button, int action); + void HandleMouseMotion(double xOff, double yOff); void HandleKey(GLFWkeyboard* keyboard, int key, int action); + + void PushKeyCaptureCallback(KeyCaptureCallback callback); }; |