Skip to content

Commit 9385318

Browse files
committed
Canvas: Don't use deprecated SetItemAllowOverlap (#250)
1 parent 190757e commit 9385318

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

Diff for: docs/CHANGELOG.txt

+2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ v0.9.2 (WIP):
1212

1313
CHANGE: Examples: Define IMGUI_DEFINE_MATH_OPERATORS before <imgui.h> (#209), thanks @ocornut
1414

15+
CHANGE: Canvas: Don't use deprecated SetItemAllowOverlap (#250)
16+
1517
BUGFIX: Editor: Correctly initialize 'width' for view resize code (thx @gnif)
1618

1719
BUGFIX: Examples: Handle node deletion before links (#182)

Diff for: imgui_canvas.cpp

+6
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,10 @@ bool ImGuiEx::Canvas::Begin(ImGuiID id, const ImVec2& size)
133133

134134
EnterLocalSpace();
135135

136+
# if IMGUI_VERSION_NUM >= 18967
137+
ImGui::SetNextItemAllowOverlap();
138+
# endif
139+
136140
// Emit dummy widget matching bounds of the canvas.
137141
ImGui::SetCursorScreenPos(m_ViewRect.Min);
138142
ImGui::Dummy(m_ViewRect.GetSize());
@@ -164,7 +168,9 @@ void ImGuiEx::Canvas::End()
164168

165169
ImGui::GetCurrentWindow()->DC.CursorMaxPos = m_WindowCursorMaxBackup;
166170

171+
# if IMGUI_VERSION_NUM < 18967
167172
ImGui::SetItemAllowOverlap();
173+
# endif
168174

169175
// Emit dummy widget matching bounds of the canvas.
170176
ImGui::SetCursorScreenPos(m_WidgetPosition);

0 commit comments

Comments
 (0)