Skip to content

Commit a6bfee0

Browse files
committed
Added misc windows
1 parent 61de42d commit a6bfee0

File tree

4 files changed

+5
-6
lines changed

4 files changed

+5
-6
lines changed

Content/madladsquadlogo.png

26.9 KB
Loading

Framework/Core/Defines.hpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,10 @@ namespace UImGui
4040
*/
4141
enum ComponentState
4242
{
43-
// The component is running
44-
UIMGUI_COMPONENT_STATE_RUNNING,
4543
// The component is not running but its events are still running
4644
UIMGUI_COMPONENT_STATE_PAUSED,
45+
// The component is running
46+
UIMGUI_COMPONENT_STATE_RUNNING,
4747
// The component is not running and its events are not running, only the constructor and destructor are called
4848
UIMGUI_COMPONENT_STATE_OFF,
4949
};

Framework/Core/Global.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ UImGui::Global::Global() noexcept
1616

1717
UImGui::Global::~Global() noexcept
1818
{
19-
delete instance;
2019
#ifdef _WIN32
2120
ExitProcess(0);
2221
#endif

Framework/Renderer/ImGui/ImGui.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,10 @@ void UImGui::GUIRenderer::beginUI(float deltaTime)
9595
ImGui::Begin("DockSpace Demo", &bIsOpen, window_flags | ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoScrollbar);
9696
ImGui::PopStyleVar();
9797
for (auto& a : internalGlobal.instance->initInfo.titlebarComponents)
98-
if (a->state != UIMGUI_COMPONENT_STATE_OFF)
98+
if (a->state == UIMGUI_COMPONENT_STATE_RUNNING)
9999
a->tick(deltaTime);
100100
for (auto& a : internalGlobal.instance->initInfo.inlineComponents)
101-
if (a->state != UIMGUI_COMPONENT_STATE_OFF)
101+
if (a->state == UIMGUI_COMPONENT_STATE_RUNNING)
102102
a->tick(deltaTime);
103103

104104
if (opt_fullscreen)
@@ -113,7 +113,7 @@ void UImGui::GUIRenderer::beginUI(float deltaTime)
113113
ImGui::DockSpace(dockspace_id, ImVec2(0.0f, 0.0f), dockspace_flags);
114114
}
115115
for (auto& a : internalGlobal.instance->initInfo.windowComponents)
116-
if (a->state != UIMGUI_COMPONENT_STATE_OFF)
116+
if (a->state == UIMGUI_COMPONENT_STATE_RUNNING)
117117
a->tick(deltaTime);
118118

119119
ImGui::End();

0 commit comments

Comments
 (0)