Modified controller

This commit is contained in:
scawful
2022-06-09 17:59:09 -04:00
parent f9b2103838
commit 976318ebf3
2 changed files with 6 additions and 4 deletions

View File

@@ -78,8 +78,8 @@ void Controller::onInput() {
io.MouseWheel = static_cast<float>(wheel); io.MouseWheel = static_cast<float>(wheel);
} }
void Controller::onLoad() const { void Controller::onLoad() {
editor->UpdateScreen(); editor.UpdateScreen();
} }
void Controller::doRender() { void Controller::doRender() {

View File

@@ -15,6 +15,7 @@
#include "Renderer.h" #include "Renderer.h"
#include "Events/Event.h" #include "Events/Event.h"
#include "View/Editor.h" #include "View/Editor.h"
#include "View/Debug.h"
int main(int argc, char** argv); int main(int argc, char** argv);
@@ -30,14 +31,15 @@ class Controller {
void onEntry(); void onEntry();
void onInput(); void onInput();
void onLoad() const; void onLoad();
void doRender(); void doRender();
void onExit(); void onExit();
private: private:
Window window; Window window;
Renderer renderer; Renderer renderer;
std::unique_ptr<View::Editor> editor; View::Debug debug;
View::Editor editor;
bool active = false; bool active = false;
void quit() { active = false; } void quit() { active = false; }
friend int ::main(int argc, char** argv); friend int ::main(int argc, char** argv);