diff --git a/editor/src/Editor.cpp b/editor/src/Editor.cpp index 684e769..fb17f94 100644 --- a/editor/src/Editor.cpp +++ b/editor/src/Editor.cpp @@ -13,6 +13,16 @@ Editor::~Editor() Shutdown(); } +Editor* Editor::GetInstance() +{ + return s_Instance; +} + +Engine* Editor::GetEngine() +{ + return s_Engine; +} + void Editor::Init() { s_Engine = new Engine(); diff --git a/editor/src/GUI.cpp b/editor/src/GUI.cpp index c515a37..05a058f 100644 --- a/editor/src/GUI.cpp +++ b/editor/src/GUI.cpp @@ -3,8 +3,7 @@ #include #include "GUI.h" -#include - +#include "Editor.h" #include "FrameBuffer.h" #include "Window.h" @@ -65,6 +64,7 @@ void GUI::LoadConfigs() style->TabBarBorderSize = 2.0f; s_StyleColors[ImGuiCol_WindowBg] = ImVec4(0.14f, 0.14f, 0.14f, 1.0f); + s_StyleColors[ImGuiCol_DockingEmptyBg] = ImVec4(0.06f, 0.06f, 0.06f, 1.0f); s_StyleColors[ImGuiCol_Border] = ImVec4(0.06f, 0.06f, 0.06f, 1.0f); s_StyleColors[ImGuiCol_PopupBg] = ImVec4(0.06f, 0.06f, 0.06f, 1.0f); s_StyleColors[ImGuiCol_FrameBg] = ImVec4(0.09f, 0.09f, 0.09f, 1.0f); @@ -96,9 +96,6 @@ void GUI::Run() ImGui_ImplGlfw_NewFrame(); ImGui::NewFrame(); ImGui::DockSpaceOverViewport(ImGui::GetMainViewport()); - - glm::vec3* clearColor = Renderer::GetData().m_ClearColor; - s_StyleColors[ImGuiCol_DockingEmptyBg] = ImVec4(clearColor->x, clearColor->y, clearColor->z, 1.0f); } void GUI::Render(const FrameBuffer& sceneBuffer)