Skip to content

Commit 797595f

Browse files
committed
update imgui, add imgui demo window option
1 parent 5e790aa commit 797595f

3 files changed

Lines changed: 11 additions & 2 deletions

File tree

cmake/deps/imgui.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ find_package(GLFW REQUIRED)
55
find_package(freetype REQUIRED)
66

77
FetchContent_Declare(imgui
8-
URL "https://github.com/ocornut/imgui/archive/v1.92.6-docking.tar.gz"
9-
URL_HASH SHA256=5e84cdaa6a6041586a0d11a3071b749734a0439d66fdbdad37ae5b27e37d396c
8+
URL "https://github.com/ocornut/imgui/archive/v1.92.7-docking.tar.gz"
9+
URL_HASH SHA256=2c58e28c957497eba0ed01c48a0bc5f118ec5f10a1c3721ba9436253a623bd72
1010
DOWNLOAD_NO_PROGRESS ON
1111
SOURCE_SUBDIR non-existing-path-to-prevent-add-subdirectory
1212
EXCLUDE_FROM_ALL

map/src/MapWindow/MapWindow.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,15 @@ Satisfactory3DMap::MapWindow::MapWindow()
6262
{WorldRenderMode::None, WorldRenderMode::HeightMap, WorldRenderMode::TileMap}, 2);
6363
showSelectionMarkerSetting_ = BoolSetting::create("Selection marker", false);
6464
showSaveTreePerLevelSetting_ = BoolSetting::create("Show save tree per level", false);
65+
showImGuiWindowSetting_ = BoolSetting::create("Show ImGui Debug Window", false);
6566

6667
config_->registerSetting(samplingFactorSetting_);
6768
config_->registerSetting(metallicSetting_);
6869
config_->registerSetting(roughnessSetting_);
6970
config_->registerSetting(worldRenderModeSetting_);
7071
config_->registerSetting(showSelectionMarkerSetting_);
7172
config_->registerSetting(showSaveTreePerLevelSetting_);
73+
config_->registerSetting(showImGuiWindowSetting_);
7274

7375
dataView_ = std::make_shared<DataView>(config_);
7476
settingsWindow_ = std::make_unique<SettingsWindow>(config_);
@@ -374,6 +376,12 @@ void Satisfactory3DMap::MapWindow::renderGui() {
374376
pakExplorer_->renderGui();
375377
aboutWindow_->renderGui();
376378

379+
bool showImGuiWindow = showImGuiWindowSetting_->getVal();
380+
if (showImGuiWindow) {
381+
ImGui::ShowDemoWindow(&showImGuiWindow);
382+
showImGuiWindowSetting_->setVal(showImGuiWindow);
383+
}
384+
377385
// Add 3D map window last that it becomes the initially active window.
378386
ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, ImVec2(0.0f, 0.0f));
379387
ImGui::PushStyleVar(ImGuiStyleVar_ChildBorderSize, 0.0f);

map/src/MapWindow/MapWindow.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ namespace Satisfactory3DMap {
110110
std::shared_ptr<EnumSetting<WorldRenderMode>> worldRenderModeSetting_;
111111
std::shared_ptr<BoolSetting> showSelectionMarkerSetting_;
112112
std::shared_ptr<BoolSetting> showSaveTreePerLevelSetting_;
113+
std::shared_ptr<BoolSetting> showImGuiWindowSetting_;
113114

114115
std::unique_ptr<GltfModel> selectionMarkerModel_;
115116
std::unique_ptr<glowl::GLSLProgram> selectionMarkerShader_;

0 commit comments

Comments
 (0)