mirror of
https://github.com/ocornut/imgui.git
synced 2026-05-23 23:29:34 +08:00
Merge branch 'master' into docking
# Conflicts: # backends/imgui_impl_dx12.cpp # docs/CHANGELOG.txt # imgui.cpp # imgui_internal.h
This commit is contained in:
+11
-2
@@ -1,4 +1,4 @@
|
||||
// dear imgui, v1.91.5
|
||||
// dear imgui, v1.91.6 WIP
|
||||
// (demo code)
|
||||
|
||||
// Help:
|
||||
@@ -320,6 +320,13 @@ static ExampleTreeNode* ExampleTree_CreateNode(const char* name, int uid, Exampl
|
||||
return node;
|
||||
}
|
||||
|
||||
static void ExampleTree_DestroyNode(ExampleTreeNode* node)
|
||||
{
|
||||
for (ExampleTreeNode* child_node : node->Childs)
|
||||
ExampleTree_DestroyNode(child_node);
|
||||
IM_DELETE(node);
|
||||
}
|
||||
|
||||
// Create example tree data
|
||||
// (this allocates _many_ more times than most other code in either Dear ImGui or others demo)
|
||||
static ExampleTreeNode* ExampleTree_CreateDemoTree()
|
||||
@@ -355,7 +362,7 @@ static ExampleTreeNode* ExampleTree_CreateDemoTree()
|
||||
// [SECTION] Demo Window / ShowDemoWindow()
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
// Data to be shared accross different functions of the demo.
|
||||
// Data to be shared across different functions of the demo.
|
||||
struct ImGuiDemoWindowData
|
||||
{
|
||||
// Examples Apps (accessible from the "Examples" menu)
|
||||
@@ -384,6 +391,8 @@ struct ImGuiDemoWindowData
|
||||
|
||||
// Other data
|
||||
ExampleTreeNode* DemoTree = NULL;
|
||||
|
||||
~ImGuiDemoWindowData() { if (DemoTree) ExampleTree_DestroyNode(DemoTree); }
|
||||
};
|
||||
|
||||
// Demonstrate most Dear ImGui features (this is big function!)
|
||||
|
||||
Reference in New Issue
Block a user