From a9ce959205784467bfd0fc30b22b299aa7989c78 Mon Sep 17 00:00:00 2001 From: datacrystals Date: Mon, 4 Jul 2022 15:00:07 +0000 Subject: [PATCH 01/13] Add Font Selector Window (#261) --- .../GUI_Window_FontSelector/CMakeLists.txt | 30 ++++++++ .../GUI_Window_ThemeSelector.cpp | 71 +++++++++++++++++++ .../GUI_Window_ThemeSelector.h | 56 +++++++++++++++ 3 files changed, 157 insertions(+) create mode 100644 Source/Core/Editor/Windows/GUI_Window_FontSelector/CMakeLists.txt create mode 100644 Source/Core/Editor/Windows/GUI_Window_FontSelector/GUI_Window_ThemeSelector.cpp create mode 100644 Source/Core/Editor/Windows/GUI_Window_FontSelector/GUI_Window_ThemeSelector.h diff --git a/Source/Core/Editor/Windows/GUI_Window_FontSelector/CMakeLists.txt b/Source/Core/Editor/Windows/GUI_Window_FontSelector/CMakeLists.txt new file mode 100644 index 0000000000..db03871a57 --- /dev/null +++ b/Source/Core/Editor/Windows/GUI_Window_FontSelector/CMakeLists.txt @@ -0,0 +1,30 @@ +######################################################################## +# This file is part of the BrainGenix-ERS Environment Rendering System # +######################################################################## + + + +# Create Library (Name Should Be Parent Dir Name) +add_library(GUI_Window_ThemeSelector + + # Add Source Files (.cpp) + "GUI_Window_ThemeSelector.cpp" + + # Add Header Files (.h) + "GUI_Window_ThemeSelector.h" + + + ${BACKWARD_ENABLE} + ) + +# Link 3rd Party Libs +target_link_libraries(GUI_Window_ThemeSelector + IMGUI + ) + +# Link Internal Libs +target_link_libraries(GUI_Window_ThemeSelector + ERS_Editor_ThemeManager + ) + +target_include_directories(GUI_Window_ThemeSelector PUBLIC ./) diff --git a/Source/Core/Editor/Windows/GUI_Window_FontSelector/GUI_Window_ThemeSelector.cpp b/Source/Core/Editor/Windows/GUI_Window_FontSelector/GUI_Window_ThemeSelector.cpp new file mode 100644 index 0000000000..134585f622 --- /dev/null +++ b/Source/Core/Editor/Windows/GUI_Window_FontSelector/GUI_Window_ThemeSelector.cpp @@ -0,0 +1,71 @@ +//======================================================================// +// This file is part of the BrainGenix-ERS Environment Rendering System // +//======================================================================// + + +#include + + +GUI_Window_ThemeSelector::GUI_Window_ThemeSelector(ERS_CLASS_ThemeManager* ThemeManager) { + + ThemeManager_ = ThemeManager; + +} + +GUI_Window_ThemeSelector::~GUI_Window_ThemeSelector() { + +} + + +void GUI_Window_ThemeSelector::Draw() { + + if (Enabled_) { + ImGuiWindowFlags Flags = ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoDocking | ImGuiWindowFlags_NoCollapse; + bool Visible = ImGui::Begin("Pick Color Theme", &Enabled_, Flags); + + ImGui::SetWindowSize(ImVec2(0, 0)); + + + if (Visible) { + + // Put Radio Buttons Here + ImGui::BeginChild("Theme Selector", ImVec2(250, 250), true); + + static int ThemeSelector = 0; + for (int i = 0; (long)i < (long)ThemeManager_->ThemeNames_.size(); i++) { + + ImGui::RadioButton(ThemeManager_->ThemeNames_[i].c_str(), &ThemeSelector, i); + + } + + + ImGui::EndChild(); + + + ImGui::Separator(); + + + // Reload Button + if (ImGui::Button("Reload Themes")) { + ThemeManager_->LoadThemes(); + } + ImGui::SameLine(); + + // Apply Button + if (ImGui::Button("Apply")) { + ThemeManager_->ApplyThemes(ThemeSelector); + } + ImGui::SameLine(); + + // Close Button + if (ImGui::Button("Close")) { + Enabled_ = false; + } + + + } + + ImGui::End(); + } + +} \ No newline at end of file diff --git a/Source/Core/Editor/Windows/GUI_Window_FontSelector/GUI_Window_ThemeSelector.h b/Source/Core/Editor/Windows/GUI_Window_FontSelector/GUI_Window_ThemeSelector.h new file mode 100644 index 0000000000..a753f349f7 --- /dev/null +++ b/Source/Core/Editor/Windows/GUI_Window_FontSelector/GUI_Window_ThemeSelector.h @@ -0,0 +1,56 @@ +//======================================================================// +// This file is part of the BrainGenix-ERS Environment Rendering System // +//======================================================================// + +#pragma once + + +// Standard Libraries (BG convention: use <> instead of "") + +// Third-Party Libraries (BG convention: use <> instead of "") +#include + +// Internal Libraries (BG convention: use <> instead of "") +#include + + +/** + * @brief This Class Provides The Theme Selector Window. + * + */ +class GUI_Window_ThemeSelector { + +private: + + ERS_CLASS_ThemeManager* ThemeManager_; /** Date: Mon, 4 Jul 2022 15:00:53 +0000 Subject: [PATCH 02/13] Add Font Selector Window (#261) --- .../Windows/GUI_Window_FontSelector/CMakeLists.txt | 14 +++++++------- ...emeSelector.cpp => GUI_Window_FontSelector.cpp} | 0 ...w_ThemeSelector.h => GUI_Window_FontSelector.h} | 0 3 files changed, 7 insertions(+), 7 deletions(-) rename Source/Core/Editor/Windows/GUI_Window_FontSelector/{GUI_Window_ThemeSelector.cpp => GUI_Window_FontSelector.cpp} (100%) rename Source/Core/Editor/Windows/GUI_Window_FontSelector/{GUI_Window_ThemeSelector.h => GUI_Window_FontSelector.h} (100%) diff --git a/Source/Core/Editor/Windows/GUI_Window_FontSelector/CMakeLists.txt b/Source/Core/Editor/Windows/GUI_Window_FontSelector/CMakeLists.txt index db03871a57..9a43316bbd 100644 --- a/Source/Core/Editor/Windows/GUI_Window_FontSelector/CMakeLists.txt +++ b/Source/Core/Editor/Windows/GUI_Window_FontSelector/CMakeLists.txt @@ -5,26 +5,26 @@ # Create Library (Name Should Be Parent Dir Name) -add_library(GUI_Window_ThemeSelector +add_library(GUI_Window_FontSelector # Add Source Files (.cpp) - "GUI_Window_ThemeSelector.cpp" + "GUI_Window_FontSelector.cpp" # Add Header Files (.h) - "GUI_Window_ThemeSelector.h" + "GUI_Window_FontSelector.h" ${BACKWARD_ENABLE} ) # Link 3rd Party Libs -target_link_libraries(GUI_Window_ThemeSelector +target_link_libraries(GUI_Window_FontSelector IMGUI ) # Link Internal Libs -target_link_libraries(GUI_Window_ThemeSelector - ERS_Editor_ThemeManager +target_link_libraries(GUI_Window_FontSelector + ERS_Editor_FontManager ) -target_include_directories(GUI_Window_ThemeSelector PUBLIC ./) +target_include_directories(GUI_Window_FontSelector PUBLIC ./) diff --git a/Source/Core/Editor/Windows/GUI_Window_FontSelector/GUI_Window_ThemeSelector.cpp b/Source/Core/Editor/Windows/GUI_Window_FontSelector/GUI_Window_FontSelector.cpp similarity index 100% rename from Source/Core/Editor/Windows/GUI_Window_FontSelector/GUI_Window_ThemeSelector.cpp rename to Source/Core/Editor/Windows/GUI_Window_FontSelector/GUI_Window_FontSelector.cpp diff --git a/Source/Core/Editor/Windows/GUI_Window_FontSelector/GUI_Window_ThemeSelector.h b/Source/Core/Editor/Windows/GUI_Window_FontSelector/GUI_Window_FontSelector.h similarity index 100% rename from Source/Core/Editor/Windows/GUI_Window_FontSelector/GUI_Window_ThemeSelector.h rename to Source/Core/Editor/Windows/GUI_Window_FontSelector/GUI_Window_FontSelector.h From 02e316bc30c6a1d060999c6ad3defad3f579f39a Mon Sep 17 00:00:00 2001 From: datacrystals Date: Mon, 4 Jul 2022 15:01:36 +0000 Subject: [PATCH 03/13] Add Font Selector Window (#261) --- .../GUI_Window_FontSelector.cpp | 26 +++++++++---------- .../GUI_Window_FontSelector.h | 18 ++++++------- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/Source/Core/Editor/Windows/GUI_Window_FontSelector/GUI_Window_FontSelector.cpp b/Source/Core/Editor/Windows/GUI_Window_FontSelector/GUI_Window_FontSelector.cpp index 134585f622..4e9621a4d1 100644 --- a/Source/Core/Editor/Windows/GUI_Window_FontSelector/GUI_Window_FontSelector.cpp +++ b/Source/Core/Editor/Windows/GUI_Window_FontSelector/GUI_Window_FontSelector.cpp @@ -3,25 +3,25 @@ //======================================================================// -#include +#include -GUI_Window_ThemeSelector::GUI_Window_ThemeSelector(ERS_CLASS_ThemeManager* ThemeManager) { +GUI_Window_FontSelector::GUI_Window_FontSelector(ERS_CLASS_FontManager* FontManager) { - ThemeManager_ = ThemeManager; + FontManager_ = FontManager; } -GUI_Window_ThemeSelector::~GUI_Window_ThemeSelector() { +GUI_Window_FontSelector::~GUI_Window_FontSelector() { } -void GUI_Window_ThemeSelector::Draw() { +void GUI_Window_FontSelector::Draw() { if (Enabled_) { ImGuiWindowFlags Flags = ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoDocking | ImGuiWindowFlags_NoCollapse; - bool Visible = ImGui::Begin("Pick Color Theme", &Enabled_, Flags); + bool Visible = ImGui::Begin("Pick Color Font", &Enabled_, Flags); ImGui::SetWindowSize(ImVec2(0, 0)); @@ -29,12 +29,12 @@ void GUI_Window_ThemeSelector::Draw() { if (Visible) { // Put Radio Buttons Here - ImGui::BeginChild("Theme Selector", ImVec2(250, 250), true); + ImGui::BeginChild("Font Selector", ImVec2(250, 250), true); - static int ThemeSelector = 0; - for (int i = 0; (long)i < (long)ThemeManager_->ThemeNames_.size(); i++) { + static int FontSelector = 0; + for (int i = 0; (long)i < (long)FontManager_->FontNames_.size(); i++) { - ImGui::RadioButton(ThemeManager_->ThemeNames_[i].c_str(), &ThemeSelector, i); + ImGui::RadioButton(FontManager_->FontNames_[i].c_str(), &FontSelector, i); } @@ -46,14 +46,14 @@ void GUI_Window_ThemeSelector::Draw() { // Reload Button - if (ImGui::Button("Reload Themes")) { - ThemeManager_->LoadThemes(); + if (ImGui::Button("Reload Fonts")) { + FontManager_->LoadFonts(); } ImGui::SameLine(); // Apply Button if (ImGui::Button("Apply")) { - ThemeManager_->ApplyThemes(ThemeSelector); + FontManager_->ApplyFonts(FontSelector); } ImGui::SameLine(); diff --git a/Source/Core/Editor/Windows/GUI_Window_FontSelector/GUI_Window_FontSelector.h b/Source/Core/Editor/Windows/GUI_Window_FontSelector/GUI_Window_FontSelector.h index a753f349f7..8c8d31b9a7 100644 --- a/Source/Core/Editor/Windows/GUI_Window_FontSelector/GUI_Window_FontSelector.h +++ b/Source/Core/Editor/Windows/GUI_Window_FontSelector/GUI_Window_FontSelector.h @@ -11,18 +11,18 @@ #include // Internal Libraries (BG convention: use <> instead of "") -#include +#include /** - * @brief This Class Provides The Theme Selector Window. + * @brief This Class Provides The Font Selector Window. * */ -class GUI_Window_ThemeSelector { +class GUI_Window_FontSelector { private: - ERS_CLASS_ThemeManager* ThemeManager_; /** Date: Mon, 4 Jul 2022 15:01:59 +0000 Subject: [PATCH 04/13] Add Font Selector Window (#261) --- Source/Core/Editor/Windows/CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Source/Core/Editor/Windows/CMakeLists.txt b/Source/Core/Editor/Windows/CMakeLists.txt index 9f5b2646a8..9cebf42d01 100644 --- a/Source/Core/Editor/Windows/CMakeLists.txt +++ b/Source/Core/Editor/Windows/CMakeLists.txt @@ -10,7 +10,6 @@ # Add Window Subdirs add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/GUI_Window_ProjectSettings) add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/GUI_Window_SceneTree) -add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/GUI_Window_ThemeSelector) add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/GUI_Window_ImportProgressBar) add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/GUI_Window_About) add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/GUI_Window_SystemLog) @@ -20,6 +19,10 @@ add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/GUI_Window_TestEditor) add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/GUI_Window_ShaderEditor) add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/GUI_Window_ScriptEditor) +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/GUI_Window_ThemeSelector) +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/GUI_Window_FontSelector) + + add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/GUI_Window_RAMGraph) add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/GUI_Window_ObjectProperties) add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/GUI_Window_RenderingSettings) From 064cbedf552d4b5bee72a06578af0233c159c926 Mon Sep 17 00:00:00 2001 From: datacrystals Date: Mon, 4 Jul 2022 15:04:02 +0000 Subject: [PATCH 05/13] Add Font Selector Window (#261) --- .../GUI_Window_FontSelector.cpp | 42 +++++++------------ 1 file changed, 16 insertions(+), 26 deletions(-) diff --git a/Source/Core/Editor/Windows/GUI_Window_FontSelector/GUI_Window_FontSelector.cpp b/Source/Core/Editor/Windows/GUI_Window_FontSelector/GUI_Window_FontSelector.cpp index 4e9621a4d1..b3d33ad938 100644 --- a/Source/Core/Editor/Windows/GUI_Window_FontSelector/GUI_Window_FontSelector.cpp +++ b/Source/Core/Editor/Windows/GUI_Window_FontSelector/GUI_Window_FontSelector.cpp @@ -19,53 +19,43 @@ GUI_Window_FontSelector::~GUI_Window_FontSelector() { void GUI_Window_FontSelector::Draw() { - if (Enabled_) { - ImGuiWindowFlags Flags = ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoDocking | ImGuiWindowFlags_NoCollapse; - bool Visible = ImGui::Begin("Pick Color Font", &Enabled_, Flags); + if (Enabled_) { - ImGui::SetWindowSize(ImVec2(0, 0)); + ImGuiWindowFlags Flags = ImGuiWindowFlags_NoDocking | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoCollapse; + if (ImGui::Begin("Font Selector", &Enabled_, Flags)) { + ImGui::SetWindowSize(ImVec2(0,0)); + ImGui::BeginChild("Font Radio Buttons", ImVec2(300, 400), true); - if (Visible) { - - // Put Radio Buttons Here - ImGui::BeginChild("Font Selector", ImVec2(250, 250), true); - - static int FontSelector = 0; - for (int i = 0; (long)i < (long)FontManager_->FontNames_.size(); i++) { - - ImGui::RadioButton(FontManager_->FontNames_[i].c_str(), &FontSelector, i); - + for (int i = 0; (long)i < (long)FontManager_->FontNameList_.size(); i++) { + ImGui::RadioButton(FontManager_->FontNameList_[i].c_str(), &FontManager_->FontSelector_, i); } - ImGui::EndChild(); - ImGui::Separator(); + ImGui::SliderFloat("Font Size", &FontManager_->FontSize_, 5.0f, 30.0f); - // Reload Button - if (ImGui::Button("Reload Fonts")) { - FontManager_->LoadFonts(); + ImGui::Separator(); + + if (ImGui::Button("Reload")) { + FontManager_->IndexFonts(); } ImGui::SameLine(); - // Apply Button if (ImGui::Button("Apply")) { - FontManager_->ApplyFonts(FontSelector); + FontManager_->UpdateFont_ = true; } ImGui::SameLine(); - // Close Button if (ImGui::Button("Close")) { Enabled_ = false; } - - } - ImGui::End(); - } + ImGui::End(); + } + } } \ No newline at end of file From 68629dcce999691d7e8ab94ac18cc433e09d5dde Mon Sep 17 00:00:00 2001 From: datacrystals Date: Mon, 4 Jul 2022 15:04:37 +0000 Subject: [PATCH 06/13] Add Font Selector Window (#261) --- .../Utils/ERS_Editor_FontManager/ERS_Editor_FontManager.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Source/Core/Editor/Utils/ERS_Editor_FontManager/ERS_Editor_FontManager.h b/Source/Core/Editor/Utils/ERS_Editor_FontManager/ERS_Editor_FontManager.h index 44d0d097b7..becc5fc886 100644 --- a/Source/Core/Editor/Utils/ERS_Editor_FontManager/ERS_Editor_FontManager.h +++ b/Source/Core/Editor/Utils/ERS_Editor_FontManager/ERS_Editor_FontManager.h @@ -33,16 +33,18 @@ class ERS_CLASS_FontManager { ERS_CLASS_LoggingSystem* Logger_; /** FontPathList_; /** FontNameList_; /** Date: Mon, 4 Jul 2022 15:05:53 +0000 Subject: [PATCH 07/13] Add Font Selector Window (#261) --- .../Core/Editor/Utils/ERS_Editor_WindowManager/CMakeLists.txt | 1 + .../Editor/Utils/ERS_Editor_WindowManager/ERS_STRUCT_Windows.h | 2 ++ 2 files changed, 3 insertions(+) diff --git a/Source/Core/Editor/Utils/ERS_Editor_WindowManager/CMakeLists.txt b/Source/Core/Editor/Utils/ERS_Editor_WindowManager/CMakeLists.txt index 2cc0129d6b..f750e07818 100644 --- a/Source/Core/Editor/Utils/ERS_Editor_WindowManager/CMakeLists.txt +++ b/Source/Core/Editor/Utils/ERS_Editor_WindowManager/CMakeLists.txt @@ -45,6 +45,7 @@ target_link_libraries(ERS_Editor_WindowManager GUI_Window_SystemLog GUI_Window_TestEditor GUI_Window_ThemeSelector + GUI_Window_FontSelector ) diff --git a/Source/Core/Editor/Utils/ERS_Editor_WindowManager/ERS_STRUCT_Windows.h b/Source/Core/Editor/Utils/ERS_Editor_WindowManager/ERS_STRUCT_Windows.h index bb26671fad..592f63ca17 100644 --- a/Source/Core/Editor/Utils/ERS_Editor_WindowManager/ERS_STRUCT_Windows.h +++ b/Source/Core/Editor/Utils/ERS_Editor_WindowManager/ERS_STRUCT_Windows.h @@ -29,6 +29,7 @@ #include #include #include +#include /** * @brief This structure holds unique pointers to all windows that are instantiated by the GUI. @@ -57,5 +58,6 @@ struct ERS_STRUCT_Windows { std::unique_ptr GUI_Window_SystemLog_; std::unique_ptr GUI_Window_TestEditor_; std::unique_ptr GUI_Window_ThemeSelector_; + std::unique_ptr GUI_Window_FontSelector_; }; \ No newline at end of file From 7393a099fdf1205605788641004a92dcee68d518 Mon Sep 17 00:00:00 2001 From: datacrystals Date: Mon, 4 Jul 2022 15:07:59 +0000 Subject: [PATCH 08/13] Add Font Selector Window (#261) --- .../ERS_Editor_WindowManager/ERS_Editor_WindowManager.cpp | 7 +++++-- .../ERS_Editor_WindowManager/ERS_Editor_WindowManager.h | 4 +++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/Source/Core/Editor/Utils/ERS_Editor_WindowManager/ERS_Editor_WindowManager.cpp b/Source/Core/Editor/Utils/ERS_Editor_WindowManager/ERS_Editor_WindowManager.cpp index d91070bcf7..2a5756132a 100644 --- a/Source/Core/Editor/Utils/ERS_Editor_WindowManager/ERS_Editor_WindowManager.cpp +++ b/Source/Core/Editor/Utils/ERS_Editor_WindowManager/ERS_Editor_WindowManager.cpp @@ -29,7 +29,7 @@ ERS_CLASS_WindowManager::~ERS_CLASS_WindowManager() { // Setup Window Struct void ERS_CLASS_WindowManager::GenerateWindowStruct(ERS_STRUCT_ProjectUtils* ProjectUtils, ERS_STRUCT_HumanInputDeviceUtils* HIDUtils, ERS_CLASS_VisualRenderer* VisualRenderer, -ERS_CLASS_ThemeManager* ThemeManager, Cursors3D* Gizmo, ERS_CLASS_SceneManager* SceneManager) { +ERS_CLASS_ThemeManager* ThemeManager, ERS_CLASS_FontManager* FontManager, Cursors3D* Gizmo, ERS_CLASS_SceneManager* SceneManager) { // Setup Window System SystemUtils_->Logger_->Log("WindowManager Subsystem Setting Up Window Struct", 4); @@ -54,6 +54,7 @@ ERS_CLASS_ThemeManager* ThemeManager, Cursors3D* Gizmo, ERS_CLASS_SceneManager* Windows_->GUI_Window_SystemLog_ = std::make_unique(SystemUtils_); Windows_->GUI_Window_TestEditor_ = std::make_unique(SystemUtils_); Windows_->GUI_Window_ThemeSelector_ = std::make_unique(ThemeManager); + Windows_->GUI_Window_FontSelector_ = std::make_unique(FontManager); SystemUtils_->Logger_->Log("WindowManager Subsystem Finished Setting Up Window Struct", 3); SystemUtils_->Logger_->Log("WindowManager Subsystem Setting Up Window Index", 4); @@ -77,6 +78,7 @@ ERS_CLASS_ThemeManager* ThemeManager, Cursors3D* Gizmo, ERS_CLASS_SceneManager* WindowNames_.push_back("SystemLog"); WindowNames_.push_back("TestEditor"); WindowNames_.push_back("ThemeSelector"); + WindowNames_.push_back("FontManager"); SystemUtils_->Logger_->Log("WindowManager Subsystem Finished Setting Up Window Index", 3); @@ -107,7 +109,8 @@ void ERS_CLASS_WindowManager::UpdateAllWindows() { Windows_->GUI_Window_SystemLog_->Draw(); Windows_->GUI_Window_TestEditor_->Draw(); Windows_->GUI_Window_ThemeSelector_->Draw(); - + Windows_->GUI_Window_FontSelector_->Draw(); + } bool ERS_CLASS_WindowManager::SetWindowStatus(std::string WindowName, bool Status) { diff --git a/Source/Core/Editor/Utils/ERS_Editor_WindowManager/ERS_Editor_WindowManager.h b/Source/Core/Editor/Utils/ERS_Editor_WindowManager/ERS_Editor_WindowManager.h index 0df5bc4dde..60abf25cd4 100644 --- a/Source/Core/Editor/Utils/ERS_Editor_WindowManager/ERS_Editor_WindowManager.h +++ b/Source/Core/Editor/Utils/ERS_Editor_WindowManager/ERS_Editor_WindowManager.h @@ -19,6 +19,7 @@ #include #include +#include #include @@ -41,6 +42,7 @@ #include #include #include +#include @@ -81,7 +83,7 @@ class ERS_CLASS_WindowManager { * */ void GenerateWindowStruct(ERS_STRUCT_ProjectUtils* ProjectUtils, ERS_STRUCT_HumanInputDeviceUtils* HIDUtils, ERS_CLASS_VisualRenderer* VisualRenderer, - ERS_CLASS_ThemeManager* ThemeManager, Cursors3D* Gizmo, ERS_CLASS_SceneManager* SceneManager); + ERS_CLASS_ThemeManager* ThemeManager, ERS_CLASS_FontManager* FontManager, Cursors3D* Gizmo, ERS_CLASS_SceneManager* SceneManager); /** From d36a66b6fe44a1d0a19ac1359f7f3884932090dd Mon Sep 17 00:00:00 2001 From: datacrystals Date: Mon, 4 Jul 2022 15:08:35 +0000 Subject: [PATCH 09/13] Add Font Selector Window (#261) --- .../ERS_Editor_WindowManager/ERS_Editor_WindowManager.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Source/Core/Editor/Utils/ERS_Editor_WindowManager/ERS_Editor_WindowManager.cpp b/Source/Core/Editor/Utils/ERS_Editor_WindowManager/ERS_Editor_WindowManager.cpp index 2a5756132a..ab5e7e2dc5 100644 --- a/Source/Core/Editor/Utils/ERS_Editor_WindowManager/ERS_Editor_WindowManager.cpp +++ b/Source/Core/Editor/Utils/ERS_Editor_WindowManager/ERS_Editor_WindowManager.cpp @@ -174,6 +174,9 @@ bool ERS_CLASS_WindowManager::SetWindowStatus(std::string WindowName, bool Statu } else if (WindowName == "ThemeSelector") { Windows_->GUI_Window_ThemeSelector_->Enabled_ = Status; return true; + } else if (WindowName == "FontSelector") { + Windows_->GUI_Window_FontSelector_->Enabled_ = Status; + return true; } else { return false; } @@ -241,6 +244,9 @@ bool ERS_CLASS_WindowManager::GetWindowStatus(std::string WindowName, bool* Stat } else if (WindowName == "ThemeSelector") { *Status = Windows_->GUI_Window_ThemeSelector_->Enabled_; return true; + } else if (WindowName == "FontSelector") { + *Status = Windows_->GUI_Window_FontSelector_->Enabled_; + return true; } else { return false; } From b3448e75112678e25d9e04bffab23a770f7728a2 Mon Sep 17 00:00:00 2001 From: datacrystals Date: Mon, 4 Jul 2022 15:09:05 +0000 Subject: [PATCH 10/13] Add Font Selector Window (#261) --- Source/Core/Editor/GUI.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Core/Editor/GUI.cpp b/Source/Core/Editor/GUI.cpp index 35073335aa..46f6777e7f 100644 --- a/Source/Core/Editor/GUI.cpp +++ b/Source/Core/Editor/GUI.cpp @@ -40,7 +40,7 @@ GUISystem::GUISystem(ERS_STRUCT_SystemUtils* SystemUtils, GLFWwindow* Window, Cu // Setup WindowManager Class WindowManager_ = std::make_unique(SystemUtils_); - WindowManager_->GenerateWindowStruct(ProjectUtils_, HIDUtils_, VisualRenderer_, ThemeManager_.get(), Cursors3D_, SceneManager_); + WindowManager_->GenerateWindowStruct(ProjectUtils_, HIDUtils_, VisualRenderer_, ThemeManager_.get(), FontManager.get(), Cursors3D_, SceneManager_); // Initialize Windows From e4711ba5d29840ca3390640968335d9744c205a3 Mon Sep 17 00:00:00 2001 From: datacrystals Date: Mon, 4 Jul 2022 15:09:11 +0000 Subject: [PATCH 11/13] Add Font Selector Window (#261) --- Source/Core/Editor/GUI.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Core/Editor/GUI.cpp b/Source/Core/Editor/GUI.cpp index 46f6777e7f..1fa513b2c6 100644 --- a/Source/Core/Editor/GUI.cpp +++ b/Source/Core/Editor/GUI.cpp @@ -40,7 +40,7 @@ GUISystem::GUISystem(ERS_STRUCT_SystemUtils* SystemUtils, GLFWwindow* Window, Cu // Setup WindowManager Class WindowManager_ = std::make_unique(SystemUtils_); - WindowManager_->GenerateWindowStruct(ProjectUtils_, HIDUtils_, VisualRenderer_, ThemeManager_.get(), FontManager.get(), Cursors3D_, SceneManager_); + WindowManager_->GenerateWindowStruct(ProjectUtils_, HIDUtils_, VisualRenderer_, ThemeManager_.get(), FontManager_.get(), Cursors3D_, SceneManager_); // Initialize Windows From 3117670204aaeb413dbcdcd1e9eaa1d13faae496 Mon Sep 17 00:00:00 2001 From: datacrystals Date: Mon, 4 Jul 2022 15:09:53 +0000 Subject: [PATCH 12/13] Add Font Selector Window (#261) --- Source/Core/Editor/Menus/GUI_Menu_View/GUI_Menu_View.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Source/Core/Editor/Menus/GUI_Menu_View/GUI_Menu_View.cpp b/Source/Core/Editor/Menus/GUI_Menu_View/GUI_Menu_View.cpp index 91c9afdada..d556d3732a 100644 --- a/Source/Core/Editor/Menus/GUI_Menu_View/GUI_Menu_View.cpp +++ b/Source/Core/Editor/Menus/GUI_Menu_View/GUI_Menu_View.cpp @@ -33,7 +33,7 @@ void GUI_Menu_View::Draw() { } if (ImGui::MenuItem("System Font")) { - ShowFontPicker_ = true; + Windows_->GUI_Window_FontSelector_->Enabled_ = !Windows_->GUI_Window_FontSelector_->Enabled_; } ImGui::Separator(); @@ -47,7 +47,5 @@ void GUI_Menu_View::Draw() { } - // Draw Windows - FontManager_->FontSelectorWindow(&ShowFontPicker_); } \ No newline at end of file From 178adf9f2d016cea75218fd7be16e3a6534f116e Mon Sep 17 00:00:00 2001 From: datacrystals Date: Mon, 4 Jul 2022 15:12:43 +0000 Subject: [PATCH 13/13] Add Font Selector Window (#261) --- .../Utils/ERS_Editor_WindowManager/ERS_Editor_WindowManager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Core/Editor/Utils/ERS_Editor_WindowManager/ERS_Editor_WindowManager.cpp b/Source/Core/Editor/Utils/ERS_Editor_WindowManager/ERS_Editor_WindowManager.cpp index ab5e7e2dc5..5279d9da0c 100644 --- a/Source/Core/Editor/Utils/ERS_Editor_WindowManager/ERS_Editor_WindowManager.cpp +++ b/Source/Core/Editor/Utils/ERS_Editor_WindowManager/ERS_Editor_WindowManager.cpp @@ -78,7 +78,7 @@ ERS_CLASS_ThemeManager* ThemeManager, ERS_CLASS_FontManager* FontManager, Cursor WindowNames_.push_back("SystemLog"); WindowNames_.push_back("TestEditor"); WindowNames_.push_back("ThemeSelector"); - WindowNames_.push_back("FontManager"); + WindowNames_.push_back("FontSelector"); SystemUtils_->Logger_->Log("WindowManager Subsystem Finished Setting Up Window Index", 3);