diff options
Diffstat (limited to 'src/port/ui/ImguiUI.cpp')
| -rw-r--r-- | src/port/ui/ImguiUI.cpp | 41 |
1 files changed, 31 insertions, 10 deletions
diff --git a/src/port/ui/ImguiUI.cpp b/src/port/ui/ImguiUI.cpp index bbaa97454..56a814de7 100644 --- a/src/port/ui/ImguiUI.cpp +++ b/src/port/ui/ImguiUI.cpp @@ -1,9 +1,13 @@ #include "ImguiUI.h" #include "UIWidgets.h" #include "ResolutionEditor.h" -#include "GameInfoWindow.h" #include "MultiplayerWindow.h" #include "FreecamWindow.h" +#include "Tools.h" +#include "SceneExplorer.h" +#include "Properties.h" +#include "TrackProperties.h" +#include "ContentBrowser.h" #include <spdlog/spdlog.h> #include <imgui.h> @@ -30,8 +34,12 @@ std::shared_ptr<Ship::GuiWindow> mConsoleWindow; std::shared_ptr<Ship::GuiWindow> mStatsWindow; std::shared_ptr<Ship::GuiWindow> mInputEditorWindow; std::shared_ptr<Ship::GuiWindow> mGfxDebuggerWindow; -std::shared_ptr<Ship::GuiWindow> mGameInfoWindow; std::shared_ptr<Ship::GuiWindow> mMultiplayerWindow; +std::shared_ptr<Ship::GuiWindow> mToolsWindow; +std::shared_ptr<Ship::GuiWindow> mSceneExplorerWindow; +std::shared_ptr<Ship::GuiWindow> mPropertiesWindow; +std::shared_ptr<Ship::GuiWindow> mTrackPropertiesWindow; +std::shared_ptr<Ship::GuiWindow> mContentBrowserWindow; void SetupGuiElements() { auto gui = Ship::Context::GetInstance()->GetWindow()->GetGui(); @@ -47,11 +55,6 @@ void SetupGuiElements() { SPDLOG_ERROR("Could not find multiplayer window"); } - mGameInfoWindow = gui->GetGuiWindow("GameInfo"); - if (mGameInfoWindow == nullptr) { - SPDLOG_ERROR("Could not find game info window"); - } - mStatsWindow = gui->GetGuiWindow("Stats"); if (mStatsWindow == nullptr) { SPDLOG_ERROR("Could not find stats window"); @@ -73,15 +76,33 @@ void SetupGuiElements() { SPDLOG_ERROR("Could not find input GfxDebuggerWindow"); } - mGameInfoWindow = std::make_shared<GameInfo::GameInfoWindow>("gGameInfoEnabled", "Game Info"); - gui->AddGuiWindow(mGameInfoWindow); + mToolsWindow = std::make_shared<Editor::ToolsWindow>("gEditorEnabled", "Tools", ImVec2(100, 100), + (ImGuiWindowFlags_NoTitleBar)); + gui->AddGuiWindow(mToolsWindow); + + mSceneExplorerWindow = std::make_shared<Editor::SceneExplorerWindow>("gEditorEnabled", "Scene Explorer"); + gui->AddGuiWindow(mSceneExplorerWindow); + + mPropertiesWindow = std::make_shared<Editor::PropertiesWindow>("gEditorEnabled", "Properties"); + gui->AddGuiWindow(mPropertiesWindow); + + mTrackPropertiesWindow = std::make_shared<Editor::TrackPropertiesWindow>("gEditorEnabled", "Track Properties"); + gui->AddGuiWindow(mTrackPropertiesWindow); + + mContentBrowserWindow = + std::make_shared<Editor::ContentBrowserWindow>("gEditorEnabled", "Content Browser"); + gui->AddGuiWindow(mContentBrowserWindow); } void Destroy() { - mGameInfoWindow = nullptr; mConsoleWindow = nullptr; mStatsWindow = nullptr; mInputEditorWindow = nullptr; + mToolsWindow = nullptr; + mSceneExplorerWindow = nullptr; + mPropertiesWindow = nullptr; + mTrackPropertiesWindow = nullptr; + mContentBrowserWindow = nullptr; } std::string GetWindowButtonText(const char* text, bool menuOpen) { |
