diff --git a/src/app/core/controller.cc b/src/app/core/controller.cc index 0f2a3c1d..05475dc9 100644 --- a/src/app/core/controller.cc +++ b/src/app/core/controller.cc @@ -97,8 +97,6 @@ void HandleMouseMovement(int &wheel) { } // namespace -bool Controller::IsActive() const { return active_; } - absl::Status Controller::OnEntry() { RETURN_IF_ERROR(CreateSDL_Window()) RETURN_IF_ERROR(CreateRenderer()) @@ -149,7 +147,7 @@ void Controller::OnInput() { HandleMouseMovement(wheel); } -void Controller::OnLoad() { master_editor_.UpdateScreen(); } +void Controller::OnLoad() { PRINT_IF_ERROR(master_editor_.Update()); } void Controller::DoRender() const { SDL_RenderClear(renderer_.get()); @@ -219,10 +217,8 @@ absl::Status Controller::CreateGuiContext() { ImGuiIO &io = ImGui::GetIO(); if (flags()->kUseNewImGuiInput) { - io.ConfigFlags |= - ImGuiConfigFlags_NavEnableKeyboard; // Enable Keyboard Controls - io.ConfigFlags |= - ImGuiConfigFlags_NavEnableGamepad; // Enable Gamepad Controls + io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard; + io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad; } // Initialize ImGui for SDL @@ -232,7 +228,7 @@ absl::Status Controller::CreateGuiContext() { if (flags()->kLoadSystemFonts) { LoadSystemFonts(); } else { - LoadFontFamilies(); + RETURN_IF_ERROR(LoadFontFamilies()); } // Set the default style diff --git a/src/app/core/controller.h b/src/app/core/controller.h index 4d2f117c..95739ffd 100644 --- a/src/app/core/controller.h +++ b/src/app/core/controller.h @@ -11,6 +11,7 @@ #include "absl/status/status.h" #include "app/core/common.h" +#include "app/core/editor.h" #include "app/editor/master_editor.h" #include "app/gui/icons.h" #include "app/gui/style.h" @@ -23,7 +24,7 @@ namespace core { class Controller : public ExperimentFlags { public: - bool IsActive() const; + bool IsActive() const { return active_; } absl::Status OnEntry(); void OnInput(); void OnLoad();