Updated ImGui.
This commit is contained in:
parent
70d5405c0c
commit
af4b746e8f
12
3rdparty/ocornut-imgui/imgui.cpp
vendored
12
3rdparty/ocornut-imgui/imgui.cpp
vendored
@ -250,7 +250,7 @@
|
||||
Here is a change-log of API breaking changes, if you are using one of the functions listed, expect to have to fix some code.
|
||||
Also read releases logs https://github.com/ocornut/imgui/releases for more details.
|
||||
|
||||
- 2018/02/18 (1.60) - BeginDragDropSource(): temporarily removed the optional mouse_button=0 parameter because it is really usable in typical conditions at the moment.
|
||||
- 2018/02/18 (1.60) - BeginDragDropSource(): temporarily removed the optional mouse_button=0 parameter because it is not really usable in many situations at the moment.
|
||||
- 2018/02/16 (1.60) - obsoleted the io.RenderDrawListsFn callback, you can call your graphics engine render function after ImGui::Render(). Use ImGui::GetDrawData() to retrieve the ImDrawData* to display.
|
||||
- 2018/02/07 (1.60) - reorganized context handling to be more explicit,
|
||||
- YOU NOW NEED TO CALL ImGui::CreateContext() AT THE BEGINNING OF YOUR APP, AND CALL ImGui::DestroyContext() AT THE END.
|
||||
@ -6063,7 +6063,7 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags)
|
||||
window->DC.TextWrapPosStack.resize(0);
|
||||
window->DC.ColumnsSet = NULL;
|
||||
window->DC.TreeDepth = 0;
|
||||
window->DC.TreeDepthMayCloseOnPop = 0x00;
|
||||
window->DC.TreeDepthMayJumpToParentOnPop = 0x00;
|
||||
window->DC.StateStorage = &window->StateStorage;
|
||||
window->DC.GroupStack.resize(0);
|
||||
window->MenuColumns.Update(3, style.ItemSpacing.x, window_just_activated_by_user);
|
||||
@ -8024,8 +8024,8 @@ bool ImGui::TreeNodeBehavior(ImGuiID id, ImGuiTreeNodeFlags flags, const char* l
|
||||
// Store a flag for the current depth to tell if we will allow closing this node when navigating one of its child.
|
||||
// For this purpose we essentially compare if g.NavIdIsAlive went from 0 to 1 between TreeNode() and TreePop().
|
||||
// This is currently only support 32 level deep and we are fine with (1 << Depth) overflowing into a zero.
|
||||
if (is_open && !g.NavIdIsAlive && (flags & ImGuiTreeNodeFlags_NavCloseFromChild) && !(flags & ImGuiTreeNodeFlags_NoTreePushOnOpen))
|
||||
window->DC.TreeDepthMayCloseOnPop |= (1 << window->DC.TreeDepth);
|
||||
if (is_open && !g.NavIdIsAlive && (flags & ImGuiTreeNodeFlags_NavLeftJumpsBackHere) && !(flags & ImGuiTreeNodeFlags_NoTreePushOnOpen))
|
||||
window->DC.TreeDepthMayJumpToParentOnPop |= (1 << window->DC.TreeDepth);
|
||||
|
||||
bool item_add = ItemAdd(interact_bb, id);
|
||||
window->DC.LastItemStatusFlags |= ImGuiItemStatusFlags_HasDisplayRect;
|
||||
@ -12693,12 +12693,12 @@ void ImGui::TreePop()
|
||||
|
||||
window->DC.TreeDepth--;
|
||||
if (g.NavMoveDir == ImGuiDir_Left && g.NavWindow == window && NavMoveRequestButNoResultYet())
|
||||
if (g.NavIdIsAlive && (window->DC.TreeDepthMayCloseOnPop & (1 << window->DC.TreeDepth)))
|
||||
if (g.NavIdIsAlive && (window->DC.TreeDepthMayJumpToParentOnPop & (1 << window->DC.TreeDepth)))
|
||||
{
|
||||
SetNavID(window->IDStack.back(), g.NavLayer);
|
||||
NavMoveRequestCancel();
|
||||
}
|
||||
window->DC.TreeDepthMayCloseOnPop &= (1 << window->DC.TreeDepth) - 1;
|
||||
window->DC.TreeDepthMayJumpToParentOnPop &= (1 << window->DC.TreeDepth) - 1;
|
||||
|
||||
PopID();
|
||||
}
|
||||
|
2
3rdparty/ocornut-imgui/imgui.h
vendored
2
3rdparty/ocornut-imgui/imgui.h
vendored
@ -611,7 +611,7 @@ enum ImGuiTreeNodeFlags_
|
||||
ImGuiTreeNodeFlags_FramePadding = 1 << 10, // Use FramePadding (even for an unframed text node) to vertically align text baseline to regular widget height. Equivalent to calling AlignTextToFramePadding().
|
||||
//ImGuITreeNodeFlags_SpanAllAvailWidth = 1 << 11, // FIXME: TODO: Extend hit box horizontally even if not framed
|
||||
//ImGuiTreeNodeFlags_NoScrollOnOpen = 1 << 12, // FIXME: TODO: Disable automatic scroll on TreePop() if node got just open and contents is not visible
|
||||
ImGuiTreeNodeFlags_NavCloseFromChild = 1 << 13, // (WIP) Nav: left direction may close this TreeNode() when focusing on any child (items submitted between TreeNode and TreePop)
|
||||
ImGuiTreeNodeFlags_NavLeftJumpsBackHere = 1 << 13, // (WIP) Nav: left direction may move to this TreeNode() from any of its child (items submitted between TreeNode and TreePop)
|
||||
ImGuiTreeNodeFlags_CollapsingHeader = ImGuiTreeNodeFlags_Framed | ImGuiTreeNodeFlags_NoAutoOpenOnLog
|
||||
|
||||
// Obsolete names (will be removed)
|
||||
|
5
3rdparty/ocornut-imgui/imgui_draw.cpp
vendored
5
3rdparty/ocornut-imgui/imgui_draw.cpp
vendored
@ -984,7 +984,10 @@ void ImDrawList::AddRect(const ImVec2& a, const ImVec2& b, ImU32 col, float roun
|
||||
{
|
||||
if ((col & IM_COL32_A_MASK) == 0)
|
||||
return;
|
||||
PathRect(a + ImVec2(0.5f,0.5f), b - ImVec2(0.5f,0.5f), rounding, rounding_corners_flags);
|
||||
if (Flags & ImDrawListFlags_AntiAliasedLines)
|
||||
PathRect(a + ImVec2(0.5f,0.5f), b - ImVec2(0.50f,0.50f), rounding, rounding_corners_flags);
|
||||
else
|
||||
PathRect(a + ImVec2(0.5f,0.5f), b - ImVec2(0.49f,0.49f), rounding, rounding_corners_flags); // Better looking lower-right corner and rounded non-AA shapes.
|
||||
PathStroke(col, true, thickness);
|
||||
}
|
||||
|
||||
|
4
3rdparty/ocornut-imgui/imgui_internal.h
vendored
4
3rdparty/ocornut-imgui/imgui_internal.h
vendored
@ -834,7 +834,7 @@ struct IMGUI_API ImGuiDrawContext
|
||||
float PrevLineTextBaseOffset;
|
||||
float LogLinePosY;
|
||||
int TreeDepth;
|
||||
ImU32 TreeDepthMayCloseOnPop; // Store a copy of !g.NavIdIsAlive for TreeDepth 0..31
|
||||
ImU32 TreeDepthMayJumpToParentOnPop; // Store a copy of !g.NavIdIsAlive for TreeDepth 0..31
|
||||
ImGuiID LastItemId;
|
||||
ImGuiItemStatusFlags LastItemStatusFlags;
|
||||
ImRect LastItemRect; // Interaction rect
|
||||
@ -874,7 +874,7 @@ struct IMGUI_API ImGuiDrawContext
|
||||
CurrentLineTextBaseOffset = PrevLineTextBaseOffset = 0.0f;
|
||||
LogLinePosY = -1.0f;
|
||||
TreeDepth = 0;
|
||||
TreeDepthMayCloseOnPop = 0x00;
|
||||
TreeDepthMayJumpToParentOnPop = 0x00;
|
||||
LastItemId = 0;
|
||||
LastItemStatusFlags = 0;
|
||||
LastItemRect = LastItemDisplayRect = ImRect();
|
||||
|
Loading…
x
Reference in New Issue
Block a user