Skip to content

Commit 7509988

Browse files
committed
[hotfix] Define default categories for DevUI main-menu.
1 parent 1ee9a80 commit 7509988

File tree

2 files changed

+6
-10
lines changed

2 files changed

+6
-10
lines changed

source/code/modules/imgui_module/private/imgui_system.cxx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,10 @@ namespace ice::devui
6666
ImGuiSystem::ImGuiSystem(ice::Allocator& alloc) noexcept
6767
: _allocator{ alloc, "ImGUI-System" }
6868
, _builtin_widgets{ alloc }
69+
, _menu_categories{ _allocator }
6970
, _widget_manager{ _allocator }
71+
, _widget_frame{ }
7072
, _widget_logger{ _allocator }
71-
, _menu_categories{ _allocator }
7273
{
7374
ice::array::push_back(_builtin_widgets, create_allocator_tree_widget(_allocator));
7475
// ice::array::push_back(_builtin_widgets, (ice::UniquePtr<ice::DevUIWidget>) ice::make_unique<ImGuiLogger>(_allocator, _allocator));
@@ -80,6 +81,10 @@ namespace ice::devui
8081
{
8182
_widget_manager.add_widget(widget.get());
8283
}
84+
85+
// Setup default main-menu categories
86+
ice::String categories[]{ "File", "Settings", "Engine", "Tools", "Help" };
87+
setup_mainmenu(categories);
8388
}
8489

8590
ImGuiSystem::~ImGuiSystem() noexcept

source/code/test/private/game.cxx

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -290,15 +290,6 @@ void TestGame::on_setup(ice::framework::State const& state) noexcept
290290
_archetype_index->register_archetype(TestTrait::Archetype_TestArchetype);
291291

292292
_entity_storage = ice::make_unique<ice::ecs::EntityStorage>(_allocator, _allocator, *_archetype_index);
293-
294-
ice::String categories[]{
295-
"File",
296-
"Settings",
297-
"Engine",
298-
"Tools",
299-
"Help"
300-
};
301-
ice::devui_setup_mainmenu(categories);
302293
}
303294

304295
void TestGame::on_shutdown(ice::framework::State const& state) noexcept

0 commit comments

Comments
 (0)