update Dear ImGui to 1.91.6
This commit is contained in:
parent
9d10f7b457
commit
4da6cb71ce
49 changed files with 903 additions and 491 deletions
27
extern/imgui_patched/imgui_demo.cpp
vendored
27
extern/imgui_patched/imgui_demo.cpp
vendored
|
|
@ -1,4 +1,4 @@
|
|||
// dear imgui, v1.91.5
|
||||
// dear imgui, v1.91.6
|
||||
// (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!)
|
||||
|
|
@ -1881,6 +1890,16 @@ static void ShowDemoWindowWidgets(ImGuiDemoWindowData* demo_data)
|
|||
ImGui::TreePop();
|
||||
}
|
||||
|
||||
IMGUI_DEMO_MARKER("Widgets/Text Input/Eliding, Alignment");
|
||||
if (ImGui::TreeNode("Eliding, Alignment"))
|
||||
{
|
||||
static char buf1[128] = "/path/to/some/folder/with/long/filename.cpp";
|
||||
static ImGuiInputTextFlags flags = ImGuiInputTextFlags_ElideLeft;
|
||||
ImGui::CheckboxFlags("ImGuiInputTextFlags_ElideLeft", &flags, ImGuiInputTextFlags_ElideLeft);
|
||||
ImGui::InputText("Path", buf1, IM_ARRAYSIZE(buf1), flags);
|
||||
ImGui::TreePop();
|
||||
}
|
||||
|
||||
IMGUI_DEMO_MARKER("Widgets/Text Input/Miscellaneous");
|
||||
if (ImGui::TreeNode("Miscellaneous"))
|
||||
{
|
||||
|
|
@ -10464,7 +10483,7 @@ struct ExampleAssetsBrowser
|
|||
}
|
||||
|
||||
ImGuiIO& io = ImGui::GetIO();
|
||||
ImGui::SetNextWindowContentSize(ImVec2(0.0f, LayoutOuterPadding + LayoutLineCount * (LayoutItemSize.x + LayoutItemSpacing)));
|
||||
ImGui::SetNextWindowContentSize(ImVec2(0.0f, LayoutOuterPadding + LayoutLineCount * (LayoutItemSize.y + LayoutItemSpacing)));
|
||||
if (ImGui::BeginChild("Assets", ImVec2(0.0f, -ImGui::GetTextLineHeightWithSpacing()), ImGuiChildFlags_Borders, ImGuiWindowFlags_NoMove))
|
||||
{
|
||||
ImDrawList* draw_list = ImGui::GetWindowDrawList();
|
||||
|
|
@ -10676,6 +10695,8 @@ void ImGui::ShowAboutWindow(bool*) {}
|
|||
void ImGui::ShowDemoWindow(bool*) {}
|
||||
void ImGui::ShowUserGuide() {}
|
||||
void ImGui::ShowStyleEditor(ImGuiStyle*) {}
|
||||
bool ImGui::ShowStyleSelector(const char* label) { return false; }
|
||||
void ImGui::ShowFontSelector(const char* label) {}
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue