From 976318ebf31ca6e0af9ea357664d5209572be688 Mon Sep 17 00:00:00 2001 From: scawful Date: Thu, 9 Jun 2022 17:59:09 -0400 Subject: [PATCH] Modified controller --- src/Application/Core/Controller.cc | 4 ++-- src/Application/Core/Controller.h | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/Application/Core/Controller.cc b/src/Application/Core/Controller.cc index 83861040..9c6b3aa1 100644 --- a/src/Application/Core/Controller.cc +++ b/src/Application/Core/Controller.cc @@ -78,8 +78,8 @@ void Controller::onInput() { io.MouseWheel = static_cast(wheel); } -void Controller::onLoad() const { - editor->UpdateScreen(); +void Controller::onLoad() { + editor.UpdateScreen(); } void Controller::doRender() { diff --git a/src/Application/Core/Controller.h b/src/Application/Core/Controller.h index fdf240e1..38116c36 100644 --- a/src/Application/Core/Controller.h +++ b/src/Application/Core/Controller.h @@ -15,6 +15,7 @@ #include "Renderer.h" #include "Events/Event.h" #include "View/Editor.h" +#include "View/Debug.h" int main(int argc, char** argv); @@ -30,14 +31,15 @@ class Controller { void onEntry(); void onInput(); - void onLoad() const; + void onLoad(); void doRender(); void onExit(); private: Window window; Renderer renderer; - std::unique_ptr editor; + View::Debug debug; + View::Editor editor; bool active = false; void quit() { active = false; } friend int ::main(int argc, char** argv);