diff --git a/BrainGenix-ERS.code-workspace b/BrainGenix-ERS.code-workspace deleted file mode 100644 index bd758711af..0000000000 --- a/BrainGenix-ERS.code-workspace +++ /dev/null @@ -1,88 +0,0 @@ -{ - "folders": [ - { - "name": "BrainGenix-ERS", - "path": "." - } - ], - "settings": { - "files.associations": { - "array": "cpp", - "atomic": "cpp", - "hash_map": "cpp", - "hash_set": "cpp", - "bit": "cpp", - "*.tcc": "cpp", - "bitset": "cpp", - "cctype": "cpp", - "charconv": "cpp", - "chrono": "cpp", - "cinttypes": "cpp", - "clocale": "cpp", - "cmath": "cpp", - "codecvt": "cpp", - "complex": "cpp", - "condition_variable": "cpp", - "cstdarg": "cpp", - "cstddef": "cpp", - "cstdint": "cpp", - "cstdio": "cpp", - "cstdlib": "cpp", - "cstring": "cpp", - "ctime": "cpp", - "cwchar": "cpp", - "cwctype": "cpp", - "deque": "cpp", - "forward_list": "cpp", - "list": "cpp", - "map": "cpp", - "set": "cpp", - "unordered_map": "cpp", - "unordered_set": "cpp", - "vector": "cpp", - "exception": "cpp", - "algorithm": "cpp", - "functional": "cpp", - "iterator": "cpp", - "memory": "cpp", - "memory_resource": "cpp", - "numeric": "cpp", - "optional": "cpp", - "random": "cpp", - "ratio": "cpp", - "regex": "cpp", - "string": "cpp", - "string_view": "cpp", - "system_error": "cpp", - "tuple": "cpp", - "type_traits": "cpp", - "utility": "cpp", - "fstream": "cpp", - "future": "cpp", - "initializer_list": "cpp", - "iomanip": "cpp", - "iosfwd": "cpp", - "iostream": "cpp", - "istream": "cpp", - "limits": "cpp", - "mutex": "cpp", - "new": "cpp", - "ostream": "cpp", - "shared_mutex": "cpp", - "sstream": "cpp", - "stdexcept": "cpp", - "streambuf": "cpp", - "thread": "cpp", - "typeindex": "cpp", - "typeinfo": "cpp", - "valarray": "cpp", - "variant": "cpp", - "compare": "cpp", - "concepts": "cpp", - "csignal": "cpp", - "numbers": "cpp", - "semaphore": "cpp", - "stop_token": "cpp" - } - } -} \ No newline at end of file diff --git a/Source/Core/Editor/Menus/GUI_Menu_Settings/GUI_Menu_Settings.cpp b/Source/Core/Editor/Menus/GUI_Menu_Settings/GUI_Menu_Settings.cpp index 635d67df3c..b7217b55f5 100644 --- a/Source/Core/Editor/Menus/GUI_Menu_Settings/GUI_Menu_Settings.cpp +++ b/Source/Core/Editor/Menus/GUI_Menu_Settings/GUI_Menu_Settings.cpp @@ -33,9 +33,19 @@ void GUI_Menu_Settings::Draw() { ImGui::MenuItem("System Font", "", &Windows_->GUI_Window_FontSelector_->Enabled_); ImGui::Separator(); + if (ImGui::BeginMenu("Editor Settings")) { + ImGui::MenuItem("Editor Camera Settings", "", &Windows_->GUI_Window_EditorCameraSettings_->Enabled_); + ImGui::EndMenu(); + } + ImGui::Separator(); + if (ImGui::BeginMenu("Engine Settings")) { + ImGui::MenuItem("Rendering Settings", "", &Windows_->GUI_Window_RenderingSettings_->Enabled_); + ImGui::MenuItem("Asset Streaming Settings", "", &Windows_->GUI_Window_AssetStreamingSettings_->Enabled_); + ImGui::EndMenu(); + } - // Controller Settings + ImGui::Separator(); if (ImGui::BeginMenu("Game Controllers")) { // Refresh diff --git a/Source/Core/Editor/Menus/GUI_Menu_Window/GUI_Menu_Window.cpp b/Source/Core/Editor/Menus/GUI_Menu_Window/GUI_Menu_Window.cpp index b8b7431a89..2473853e62 100644 --- a/Source/Core/Editor/Menus/GUI_Menu_Window/GUI_Menu_Window.cpp +++ b/Source/Core/Editor/Menus/GUI_Menu_Window/GUI_Menu_Window.cpp @@ -37,9 +37,6 @@ void GUI_Menu_Window::Draw() { ImGui::MenuItem("System Log", "", &Windows_->GUI_Window_SystemLog_->Enabled_); ImGui::MenuItem("Asset Explorer", "", &Windows_->GUI_Window_AssetExplorer_->Enabled_); ImGui::MenuItem("Object Properties", "", &Windows_->GUI_Window_ObjectProperties_->Enabled_); - ImGui::MenuItem("Rendering Settings", "", &Windows_->GUI_Window_RenderingSettings_->Enabled_); - ImGui::MenuItem("Asset Streaming Settings", "", &Windows_->GUI_Window_AssetStreamingSettings_->Enabled_); - // Framerate Widgets if (ImGui::BeginMenu("Framerate")) { diff --git a/Source/Core/Editor/Utils/ERS_Editor_WindowManager/CMakeLists.txt b/Source/Core/Editor/Utils/ERS_Editor_WindowManager/CMakeLists.txt index 97f931bf99..2f400d8034 100644 --- a/Source/Core/Editor/Utils/ERS_Editor_WindowManager/CMakeLists.txt +++ b/Source/Core/Editor/Utils/ERS_Editor_WindowManager/CMakeLists.txt @@ -39,6 +39,7 @@ target_link_libraries(ERS_Editor_WindowManager GUI_Window_ProjectSettings GUI_Window_RAMGraph GUI_Window_RenderingSettings + GUI_Window_EditorCameraSettings GUI_Window_SceneTree GUI_Window_ScriptEditor GUI_Window_ShaderEditor 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 b23a7c13ef..bfbfa6fc40 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 @@ -35,29 +35,30 @@ ERS_CLASS_ThemeManager* ThemeManager, ERS_CLASS_FontManager* FontManager, Cursor SystemUtils_->Logger_->Log("WindowManager Subsystem Setting Up Window Struct", 4); // Construct All Widnows -- PLEASE SEE README.MD IN WINDOWS DIRECTORY FOR INFO ABOUT ADDING NEW WINDOWS -- - Windows_->GUI_Window_About_ = std::make_unique(SystemUtils_); - Windows_->GUI_Window_AssetExplorer_ = std::make_unique(SystemUtils_, ProjectUtils); - Windows_->GUI_Window_ControllerSettings_ = std::make_unique(SystemUtils_, HIDUtils, ProjectUtils); - Windows_->GUI_Window_FrameLatencyGraph_ = std::make_unique(SystemUtils_); - Windows_->GUI_Window_FramerateGraph_ = std::make_unique(); - Windows_->GUI_Window_FramerateCounter_ = std::make_unique(); - Windows_->GUI_Window_FramerateHistogram_ = std::make_unique(); - Windows_->GUI_Window_FrameratePlot_ = std::make_unique(); - Windows_->GUI_Window_ImportProgressBar_ = std::make_unique(SystemUtils_); - Windows_->GUI_Window_ObjectProperties_ = std::make_unique(Gizmo, SceneManager, ProjectUtils, VisualRenderer); - Windows_->GUI_Window_ProjectSettings_ = std::make_unique(ProjectUtils, SystemUtils_); - Windows_->GUI_Window_RAMGraph_ = std::make_unique(SystemUtils_); - Windows_->GUI_Window_RenderingSettings_ = std::make_unique(SystemUtils_); - Windows_->GUI_Window_SceneTree_ = std::make_unique(SceneManager, SystemUtils_, ProjectUtils, Gizmo); - Windows_->GUI_Window_ScriptEditor_ = std::make_unique(SystemUtils_, ProjectUtils, VisualRenderer); - Windows_->GUI_Window_ShaderEditor_ = std::make_unique(SystemUtils_, ProjectUtils, VisualRenderer); - 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); - Windows_->GUI_Window_OpenProject_ = std::make_unique(SystemUtils_); - Windows_->GUI_Window_NewProject_ = std::make_unique(SystemUtils_); - Windows_->GUI_Window_AssetStreamingSettings_ = std::make_unique(SystemUtils_, ProjectUtils); + Windows_->GUI_Window_About_ = std::make_unique (SystemUtils_); + Windows_->GUI_Window_AssetExplorer_ = std::make_unique (SystemUtils_, ProjectUtils); + Windows_->GUI_Window_ControllerSettings_ = std::make_unique (SystemUtils_, HIDUtils, ProjectUtils); + Windows_->GUI_Window_FrameLatencyGraph_ = std::make_unique (SystemUtils_); + Windows_->GUI_Window_FramerateGraph_ = std::make_unique (); + Windows_->GUI_Window_FramerateCounter_ = std::make_unique (); + Windows_->GUI_Window_FramerateHistogram_ = std::make_unique (); + Windows_->GUI_Window_FrameratePlot_ = std::make_unique (); + Windows_->GUI_Window_ImportProgressBar_ = std::make_unique (SystemUtils_); + Windows_->GUI_Window_ObjectProperties_ = std::make_unique (Gizmo, SceneManager, ProjectUtils, VisualRenderer); + Windows_->GUI_Window_ProjectSettings_ = std::make_unique (ProjectUtils, SystemUtils_); + Windows_->GUI_Window_RAMGraph_ = std::make_unique (SystemUtils_); + Windows_->GUI_Window_RenderingSettings_ = std::make_unique (SystemUtils_); + Windows_->GUI_Window_EditorCameraSettings_ = std::make_unique (SystemUtils_, VisualRenderer); + Windows_->GUI_Window_SceneTree_ = std::make_unique (SceneManager, SystemUtils_, ProjectUtils, Gizmo); + Windows_->GUI_Window_ScriptEditor_ = std::make_unique (SystemUtils_, ProjectUtils, VisualRenderer); + Windows_->GUI_Window_ShaderEditor_ = std::make_unique (SystemUtils_, ProjectUtils, VisualRenderer); + 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); + Windows_->GUI_Window_OpenProject_ = std::make_unique (SystemUtils_); + Windows_->GUI_Window_NewProject_ = std::make_unique (SystemUtils_); + Windows_->GUI_Window_AssetStreamingSettings_ = std::make_unique (SystemUtils_, ProjectUtils); SystemUtils_->Logger_->Log("WindowManager Subsystem Finished Setting Up Window Struct", 3); SystemUtils_->Logger_->Log("WindowManager Subsystem Setting Up Window Index", 4); @@ -75,6 +76,7 @@ ERS_CLASS_ThemeManager* ThemeManager, ERS_CLASS_FontManager* FontManager, Cursor WindowNames_.push_back("ProjectSettings"); WindowNames_.push_back("RAMGraph"); WindowNames_.push_back("RenderingSettings"); + WindowNames_.push_back("EditorCameraSettings"); WindowNames_.push_back("SceneTree"); WindowNames_.push_back("ScriptEditor"); WindowNames_.push_back("ShaderEditor"); @@ -96,29 +98,30 @@ ERS_CLASS_ThemeManager* ThemeManager, ERS_CLASS_FontManager* FontManager, Cursor void ERS_CLASS_WindowManager::UpdateAllWindows() { // Make sure to add your window here as well, again see the above mentioned readme for more info - Windows_->GUI_Window_About_->Draw(); - Windows_->GUI_Window_AssetExplorer_->Draw(); - Windows_->GUI_Window_ControllerSettings_->Draw(); - Windows_->GUI_Window_FrameLatencyGraph_->Draw(); - Windows_->GUI_Window_FramerateGraph_->Draw(); - Windows_->GUI_Window_FramerateCounter_->Draw(); - Windows_->GUI_Window_FramerateHistogram_->Draw(); - Windows_->GUI_Window_FrameratePlot_->Draw(); - Windows_->GUI_Window_ImportProgressBar_->Draw(); - Windows_->GUI_Window_ObjectProperties_->Draw(); - Windows_->GUI_Window_ProjectSettings_->Draw(); - Windows_->GUI_Window_RAMGraph_->Draw(); - Windows_->GUI_Window_RenderingSettings_->Draw(); - Windows_->GUI_Window_SceneTree_->Draw(); - Windows_->GUI_Window_ScriptEditor_->Draw(); - Windows_->GUI_Window_ShaderEditor_->Draw(); - Windows_->GUI_Window_SystemLog_->Draw(); - Windows_->GUI_Window_TestEditor_->Draw(); - Windows_->GUI_Window_ThemeSelector_->Draw(); - Windows_->GUI_Window_FontSelector_->Draw(); - Windows_->GUI_Window_OpenProject_->Draw(); - Windows_->GUI_Window_NewProject_->Draw(); - Windows_->GUI_Window_AssetStreamingSettings_->Draw(); + Windows_->GUI_Window_About_ ->Draw(); + Windows_->GUI_Window_AssetExplorer_ ->Draw(); + Windows_->GUI_Window_ControllerSettings_ ->Draw(); + Windows_->GUI_Window_FrameLatencyGraph_ ->Draw(); + Windows_->GUI_Window_FramerateGraph_ ->Draw(); + Windows_->GUI_Window_FramerateCounter_ ->Draw(); + Windows_->GUI_Window_FramerateHistogram_ ->Draw(); + Windows_->GUI_Window_FrameratePlot_ ->Draw(); + Windows_->GUI_Window_ImportProgressBar_ ->Draw(); + Windows_->GUI_Window_ObjectProperties_ ->Draw(); + Windows_->GUI_Window_ProjectSettings_ ->Draw(); + Windows_->GUI_Window_RAMGraph_ ->Draw(); + Windows_->GUI_Window_RenderingSettings_ ->Draw(); + Windows_->GUI_Window_EditorCameraSettings_ ->Draw(); + Windows_->GUI_Window_SceneTree_ ->Draw(); + Windows_->GUI_Window_ScriptEditor_ ->Draw(); + Windows_->GUI_Window_ShaderEditor_ ->Draw(); + Windows_->GUI_Window_SystemLog_ ->Draw(); + Windows_->GUI_Window_TestEditor_ ->Draw(); + Windows_->GUI_Window_ThemeSelector_ ->Draw(); + Windows_->GUI_Window_FontSelector_ ->Draw(); + Windows_->GUI_Window_OpenProject_ ->Draw(); + Windows_->GUI_Window_NewProject_ ->Draw(); + Windows_->GUI_Window_AssetStreamingSettings_ ->Draw(); } @@ -165,6 +168,9 @@ bool ERS_CLASS_WindowManager::SetWindowStatus(std::string WindowName, bool Statu } else if (WindowName == "RenderingSettings") { Windows_->GUI_Window_RenderingSettings_->Enabled_ = Status; return true; + } else if (WindowName == "EditorCameraSettings") { + Windows_->GUI_Window_EditorCameraSettings_->Enabled_ = Status; + return true; } else if (WindowName == "SceneTree") { Windows_->GUI_Window_SceneTree_->Enabled_ = Status; return true; @@ -244,6 +250,9 @@ bool ERS_CLASS_WindowManager::GetWindowStatus(std::string WindowName, bool* Stat } else if (WindowName == "RenderingSettings") { *Status = Windows_->GUI_Window_RenderingSettings_->Enabled_; return true; + } else if (WindowName == "EditorCameraSettings") { + *Status = Windows_->GUI_Window_EditorCameraSettings_->Enabled_; + return true; } else if (WindowName == "SceneTree") { *Status = Windows_->GUI_Window_SceneTree_->Enabled_; return true; 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 c0aadd3f6d..7148ee8f4b 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 @@ -36,6 +36,7 @@ #include #include #include +#include #include #include #include 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 52a7741aaf..c5051508bf 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 @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include @@ -42,28 +43,29 @@ struct ERS_STRUCT_Windows { // Pointers to all Window Objects - std::unique_ptr GUI_Window_About_; - std::unique_ptr GUI_Window_AssetExplorer_; - std::unique_ptr GUI_Window_ControllerSettings_; - std::unique_ptr GUI_Window_FrameLatencyGraph_; - std::unique_ptr GUI_Window_FramerateCounter_; - std::unique_ptr GUI_Window_FramerateGraph_; - std::unique_ptr GUI_Window_FramerateHistogram_; - std::unique_ptr GUI_Window_FrameratePlot_; - std::unique_ptr GUI_Window_ImportProgressBar_; - std::unique_ptr GUI_Window_ObjectProperties_; - std::unique_ptr GUI_Window_ProjectSettings_; - std::unique_ptr GUI_Window_RAMGraph_; - std::unique_ptr GUI_Window_RenderingSettings_; - std::unique_ptr GUI_Window_SceneTree_; - std::unique_ptr GUI_Window_ScriptEditor_; - std::unique_ptr GUI_Window_ShaderEditor_; - std::unique_ptr GUI_Window_SystemLog_; - std::unique_ptr GUI_Window_TestEditor_; - std::unique_ptr GUI_Window_ThemeSelector_; - std::unique_ptr GUI_Window_FontSelector_; - std::unique_ptr GUI_Window_OpenProject_; - std::unique_ptr GUI_Window_NewProject_; + std::unique_ptr GUI_Window_About_; + std::unique_ptr GUI_Window_AssetExplorer_; + std::unique_ptr GUI_Window_ControllerSettings_; + std::unique_ptr GUI_Window_FrameLatencyGraph_; + std::unique_ptr GUI_Window_FramerateCounter_; + std::unique_ptr GUI_Window_FramerateGraph_; + std::unique_ptr GUI_Window_FramerateHistogram_; + std::unique_ptr GUI_Window_FrameratePlot_; + std::unique_ptr GUI_Window_ImportProgressBar_; + std::unique_ptr GUI_Window_ObjectProperties_; + std::unique_ptr GUI_Window_ProjectSettings_; + std::unique_ptr GUI_Window_RAMGraph_; + std::unique_ptr GUI_Window_RenderingSettings_; + std::unique_ptr GUI_Window_EditorCameraSettings_; + std::unique_ptr GUI_Window_SceneTree_; + std::unique_ptr GUI_Window_ScriptEditor_; + std::unique_ptr GUI_Window_ShaderEditor_; + std::unique_ptr GUI_Window_SystemLog_; + std::unique_ptr GUI_Window_TestEditor_; + std::unique_ptr GUI_Window_ThemeSelector_; + std::unique_ptr GUI_Window_FontSelector_; + std::unique_ptr GUI_Window_OpenProject_; + std::unique_ptr GUI_Window_NewProject_; std::unique_ptr GUI_Window_AssetStreamingSettings_; diff --git a/Source/Core/Editor/Windows/CMakeLists.txt b/Source/Core/Editor/Windows/CMakeLists.txt index be947a06ef..2ad136482f 100644 --- a/Source/Core/Editor/Windows/CMakeLists.txt +++ b/Source/Core/Editor/Windows/CMakeLists.txt @@ -29,6 +29,7 @@ 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) +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/GUI_Window_EditorCameraSettings) add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/GUI_Window_AssetStreamingSettings) add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/GUI_Window_FramerateGraph) add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/GUI_Window_FrameLatencyGraph) diff --git a/Source/Core/Editor/Windows/GUI_Window_EditorCameraSettings/CMakeLists.txt b/Source/Core/Editor/Windows/GUI_Window_EditorCameraSettings/CMakeLists.txt new file mode 100644 index 0000000000..0c92d4d7d0 --- /dev/null +++ b/Source/Core/Editor/Windows/GUI_Window_EditorCameraSettings/CMakeLists.txt @@ -0,0 +1,26 @@ +# Create Library (Name Should Be Parent Dir Name) +add_library(GUI_Window_EditorCameraSettings + + "GUI_Window_EditorCameraSettings.cpp" + "GUI_Window_EditorCameraSettings.h" + + ${BACKWARD_ENABLE} + ) + +# Link 3rd Party Libs +target_link_libraries(GUI_Window_EditorCameraSettings + glad + glfw + IMGUI + ) + +# Link Internal Libs +target_link_libraries(GUI_Window_EditorCameraSettings + ERS_STRUCT_SystemUtils + ERS_STRUCT_RendererSettings + + ERS_CLASS_VisualRenderer + + ) + +target_include_directories(GUI_Window_EditorCameraSettings PUBLIC ./) \ No newline at end of file diff --git a/Source/Core/Editor/Windows/GUI_Window_EditorCameraSettings/GUI_Window_EditorCameraSettings.cpp b/Source/Core/Editor/Windows/GUI_Window_EditorCameraSettings/GUI_Window_EditorCameraSettings.cpp new file mode 100644 index 0000000000..6a6a5462c4 --- /dev/null +++ b/Source/Core/Editor/Windows/GUI_Window_EditorCameraSettings/GUI_Window_EditorCameraSettings.cpp @@ -0,0 +1,116 @@ +//======================================================================// +// This file is part of the BrainGenix-ERS Environment Rendering System // +//======================================================================// + +#include + +GUI_Window_EditorCameraSettings::GUI_Window_EditorCameraSettings(ERS_STRUCT_SystemUtils* SystemUtils, ERS_CLASS_VisualRenderer* VisualRenderer) { + + SystemUtils_ = SystemUtils; + VisualRenderer_ = VisualRenderer; + SystemUtils_->Logger_->Log("Initializing Editor Camera Settings GUI_Window", 5); + + +} + +GUI_Window_EditorCameraSettings::~GUI_Window_EditorCameraSettings() { + +} + +void GUI_Window_EditorCameraSettings::Draw() { + + if (Enabled_) { + bool Visible = ImGui::Begin("Editor Camera Settings", &Enabled_); + + // Set Initial Window Size + ImGui::SetWindowSize(ImVec2(460,330), ImGuiCond_FirstUseEver); + + // Limit Index + SelectedViewportIndex_ = std::min((int)VisualRenderer_->Viewports_.size() - 1, SelectedViewportIndex_); + + + if (Visible) { + + // Show Information About Every Viewport + if (ImGui::BeginCombo("Viewport", VisualRenderer_->Viewports_[SelectedViewportIndex_]->Name.c_str())) { + for (unsigned int i = 0; i < VisualRenderer_->Viewports_.size(); i++) { + bool IsSelected = SelectedViewportIndex_ == (int)i; + if (ImGui::Selectable(VisualRenderer_->Viewports_[i]->Name.c_str(), &IsSelected)) { + SelectedViewportIndex_ = i; + } + } + ImGui::EndCombo(); + } + + ImGui::Spacing(); + ImGui::Separator(); + ImGui::Spacing(); + + + ERS_STRUCT_Viewport* Viewport = VisualRenderer_->Viewports_[SelectedViewportIndex_].get(); + + + // Movement Speed Controls + if (ImGui::CollapsingHeader("Movement Speed", ImGuiTreeNodeFlags_DefaultOpen)) { + ImGui::Spacing(); + + float MinSpeed, MaxSpeed, CurrentSpeed; + Viewport->Processor->GetMovementSpeedBoundries(MinSpeed, MaxSpeed); + Viewport->Processor->GetMovementSpeed(CurrentSpeed); + ImGui::DragFloat("Movement Speed", &CurrentSpeed, 0.025f, 0.0f, 100.0f); + ImGui::DragFloat("Minimum Speed", &MinSpeed, 0.05f, 0.0f, 10.0f); + ImGui::DragFloat("Maximum Speed", &MaxSpeed, 0.05f, 0.0f, 100.0f); + Viewport->Processor->SetMovementSpeed(CurrentSpeed); + Viewport->Processor->SetMovementSpeedBoundries(MinSpeed, MaxSpeed); + + ImGui::Spacing(); + } + + // Mouse Controls + if (ImGui::CollapsingHeader("Mouse Settings", ImGuiTreeNodeFlags_DefaultOpen)) { + ImGui::Spacing(); + + bool ConstrainPitch; + float MouseSensitivity; + Viewport->Processor->GetPitchConstraint(ConstrainPitch); + Viewport->Processor->GetMouseSensitivity(MouseSensitivity); + ImGui::Checkbox("Constrain Pitch", &ConstrainPitch); + ImGui::DragFloat("Mouse Sensitivity", &MouseSensitivity, 0.0025f, 0.001f, 1.0f); + Viewport->Processor->SetPitchConstraint(ConstrainPitch); + Viewport->Processor->SetMouseSensitivity(MouseSensitivity); + + ImGui::Spacing(); + } + + // Location/Rotation Information + if (ImGui::CollapsingHeader("Mouse Settings", ImGuiTreeNodeFlags_DefaultOpen)) { + ImGui::Spacing(); + + float Colors[9] = { + 0.7f, 0.1f, 0.1f, + 0.1f, 0.7f, 0.1f, + 0.1f, 0.1f, 0.7f + }; + + glm::vec3 Pos, Rot; + Viewport->Processor->GetPosition(Pos); + Viewport->Processor->GetRotation(Rot); + ImGui::DragFloat3("Location", (float*)glm::value_ptr(Pos), 0.05f, Colors); + ImGui::DragFloat3("Rotation", (float*)glm::value_ptr(Rot), 0.05f, Colors); + Viewport->Processor->SetPosition(Pos); + Viewport->Processor->SetRotation(Rot); + + ImGui::Spacing(); + } + } + + + + // End System Controls Window + ImGui::End(); + + } + + + +} \ No newline at end of file diff --git a/Source/Core/Editor/Windows/GUI_Window_EditorCameraSettings/GUI_Window_EditorCameraSettings.h b/Source/Core/Editor/Windows/GUI_Window_EditorCameraSettings/GUI_Window_EditorCameraSettings.h new file mode 100644 index 0000000000..1da4fdacd3 --- /dev/null +++ b/Source/Core/Editor/Windows/GUI_Window_EditorCameraSettings/GUI_Window_EditorCameraSettings.h @@ -0,0 +1,66 @@ +//======================================================================// +// This file is part of the BrainGenix-ERS Environment Rendering System // +//======================================================================// + +#pragma once + + +// Standard Libraries (BG convention: use <> instead of "") +#include +#include + +// Third-Party Libraries (BG convention: use <> instead of "") +#include + +#include + +#include + +// Internal Libraries (BG convention: use <> instead of "") +#include +#include + +#include +#include + +#include + + +/** + * @brief Create GUI GUI_Window "EditorCamera Settings" + * + */ +class GUI_Window_EditorCameraSettings { + +private: + + ERS_STRUCT_SystemUtils* SystemUtils_; /**