Skip to content

Commit e626216

Browse files
committed
Revert "- Update imgui_test_engine"
This reverts commit 6a519d8.
1 parent d3414e1 commit e626216

20 files changed

+57
-217
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ Easy to use, hand-crafted API with default arguments, named parameters and Zig s
1616

1717
## Versions
1818

19-
* [ImGui](https://github.com/ocornut/imgui/tree/v1.92.1-docking) `1.92.1-docking`
20-
* [ImGui test engine](https://github.com/ocornut/imgui_test_engine/tree/v1.92.1) `1.92.1`
21-
* [ImPlot](https://github.com/epezent/implot) `3da8bd3`
19+
* [ImGui](https://github.com/ocornut/imgui/tree/v1.91.8-docking) `1.92.1-docking`
20+
* [ImGui test engine](https://github.com/ocornut/imgui_test_engine/tree/v1.91.8) `1.91.8`
21+
* [ImPlot](https://github.com/epezent/implot) `O.17`
2222
* [ImGuizmo](https://github.com/CedricGuillemet/ImGuizmo) `1.91.3 WIP`
23-
* [ImGuiNodeEditor](https://github.com/thedmd/imgui-node-editor/tree/v0.9.3) `e78e447`
23+
* [ImGuiNodeEditor](https://github.com/thedmd/imgui-node-editor/tree/v0.9.3) `O.9.3`
2424

2525
## Getting started
2626

libs/imgui_test_engine/imgui_capture_tool.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@
22
// (screen/video capture tool)
33
// This is usable as a standalone applet or controlled by the test engine.
44

5-
// This file is governed by the "Dear ImGui Test Engine License".
6-
// Details of the license are provided in the LICENSE.txt file in the same directory.
7-
85
// Two mode of operation:
96
// - Interactive: call ImGuiCaptureToolUI::ShowCaptureToolWindow()
107
// - Programmatic: generally via ImGuiTestContext::CaptureXXX functions
@@ -206,7 +203,6 @@ void ImGuiCaptureContext::PreRender()
206203
if (IsCapturing())
207204
{
208205
const ImGuiCaptureArgs* args = _CaptureArgs;
209-
IM_ASSERT(args != NULL);
210206
g.IO.MouseDrawCursor = !(args->InFlags & ImGuiCaptureFlags_HideMouseCursor);
211207
}
212208
}
@@ -619,7 +615,6 @@ void ImGuiCaptureContext::EndVideoCapture()
619615
IM_ASSERT(_VideoRecording == true);
620616

621617
_VideoRecording = false;
622-
_CaptureArgs = nullptr;
623618
}
624619

625620
bool ImGuiCaptureContext::IsCapturingVideo()

libs/imgui_test_engine/imgui_capture_tool.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@
22
// (screen/video capture tool)
33
// This is usable as a standalone applet or controlled by the test engine.
44

5-
// This file is governed by the "Dear ImGui Test Engine License".
6-
// Details of the license are provided in the LICENSE.txt file in the same directory.
7-
85
#pragma once
96

107
// Need "imgui_te_engine.h" included for ImFuncPtr

libs/imgui_test_engine/imgui_te_context.cpp

Lines changed: 6 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@
22
// (context when a running test + end user automation API)
33
// This is the main (if not only) interface that your Tests will be using.
44

5-
// This file is governed by the "Dear ImGui Test Engine License".
6-
// Details of the license are provided in the LICENSE.txt file in the same directory.
7-
85
#if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_WARNINGS)
96
#define _CRT_SECURE_NO_WARNINGS
107
#endif
@@ -1625,13 +1622,7 @@ void ImGuiTestContext::_MakeAimingSpaceOverPos(ImGuiViewport* viewport, ImGuiWin
16251622
LogDebug("_MakeAimingSpaceOverPos(over_window = '%s', over_pos = %.2f,%.2f)", over_window ? over_window->Name : "N/A", over_pos.x, over_pos.y);
16261623

16271624
const int over_window_n = (over_window != nullptr) ? ImGui::FindWindowDisplayIndex(over_window) : -1;
1628-
#if IMGUI_VERSION_NUM < 19183
1629-
const ImVec2 hover_padding = g.WindowsHoverPadding;
1630-
#else
1631-
const ImVec2 hover_padding = ImVec2(g.WindowsBorderHoverPadding, g.WindowsBorderHoverPadding);
1632-
#endif
1633-
1634-
const ImVec2 window_min_pos = over_pos + hover_padding + ImVec2(1.0f, 1.0f);
1625+
const ImVec2 window_min_pos = over_pos + g.WindowsHoverPadding + ImVec2(1.0f, 1.0f);
16351626
for (int window_n = g.Windows.Size - 1; window_n > over_window_n; window_n--)
16361627
{
16371628
ImGuiWindow* window = g.Windows[window_n];
@@ -1741,16 +1732,11 @@ void ImGuiTestContext::MouseMove(ImGuiTestRef ref, ImGuiTestOpFlags flags)
17411732

17421733
// Check visibility and scroll if necessary
17431734
{
1744-
#if IMGUI_VERSION_NUM < 19183
1745-
const ImVec2 hover_padding = g.WindowsHoverPadding;
1746-
#else
1747-
const ImVec2 hover_padding = ImVec2(g.WindowsBorderHoverPadding, g.WindowsBorderHoverPadding);
1748-
#endif
17491735
if (item.NavLayer == ImGuiNavLayer_Main)
17501736
{
17511737
float min_visible_size = 10.0f;
1752-
float min_window_size_x = window->DecoInnerSizeX1 + window->DecoOuterSizeX1 + window->DecoOuterSizeX2 + min_visible_size + hover_padding.x * 2.0f;
1753-
float min_window_size_y = window->DecoInnerSizeY1 + window->DecoOuterSizeY1 + window->DecoOuterSizeY2 + min_visible_size + hover_padding.y * 2.0f;
1738+
float min_window_size_x = window->DecoInnerSizeX1 + window->DecoOuterSizeX1 + window->DecoOuterSizeX2 + min_visible_size + g.WindowsHoverPadding.x * 2.0f;
1739+
float min_window_size_y = window->DecoInnerSizeY1 + window->DecoOuterSizeY1 + window->DecoOuterSizeY2 + min_visible_size + g.WindowsHoverPadding.y * 2.0f;
17541740
if ((window->Size.x < min_window_size_x || window->Size.y < min_window_size_y) && (window->Flags & ImGuiWindowFlags_NoResize) == 0 && (window->Flags & ImGuiWindowFlags_AlwaysAutoResize) == 0)
17551741
{
17561742
LogDebug("MouseMove: Will attempt to resize window to make item in main scrolling layer visible.");
@@ -1763,7 +1749,7 @@ void ImGuiTestContext::MouseMove(ImGuiTestRef ref, ImGuiTestOpFlags flags)
17631749
}
17641750

17651751
ImRect window_r = window->InnerClipRect;
1766-
window_r.Expand(ImVec2(-hover_padding.x, -hover_padding.y));
1752+
window_r.Expand(ImVec2(-g.WindowsHoverPadding.x, -g.WindowsHoverPadding.y));
17671753

17681754
ImRect item_r_clipped;
17691755
item_r_clipped.Min.x = ImClamp(item.RectFull.Min.x, window_r.Min.x, window_r.Max.x);
@@ -1876,11 +1862,7 @@ void ImGuiTestContext::MouseMove(ImGuiTestRef ref, ImGuiTestOpFlags flags)
18761862
if (is_hovering_resize_corner)
18771863
{
18781864
LogDebug("MouseMove: Child obstructed by parent's ResizeGrip, trying to resize window and trying again..");
1879-
#if IMGUI_VERSION_NUM < 19172
18801865
float extra_size = window->CalcFontSize() * 3.0f;
1881-
#else
1882-
float extra_size = window->FontRefSize * 3.0f;
1883-
#endif
18841866
WindowResize(window->ID, window->Size + ImVec2(extra_size, extra_size));
18851867
MouseMove(ref, flags | ImGuiTestOpFlags_IsSecondAttempt);
18861868
return;
@@ -2003,19 +1985,14 @@ void ImGuiTestContext::_ForeignWindowsHideOverPos(const ImVec2& pos, ImGuiWindow
20031985
for (int i = 0; ignore_list[i]; i++)
20041986
min_window_index = ImMin(min_window_index, ImGui::FindWindowDisplayIndex(ignore_list[i]));
20051987

2006-
#if IMGUI_VERSION_NUM < 19183
2007-
const ImVec2 hover_padding = g.WindowsHoverPadding;
2008-
#else
2009-
const ImVec2 hover_padding = ImVec2(g.WindowsBorderHoverPadding, g.WindowsBorderHoverPadding);
2010-
#endif
20111988
bool hidden_windows = false;
20121989
for (int i = 0; i < g.Windows.Size; i++)
20131990
{
20141991
ImGuiWindow* other_window = g.Windows[i];
20151992
if (other_window->RootWindow == other_window && other_window->WasActive)
20161993
{
20171994
ImRect r = other_window->Rect();
2018-
r.Expand(hover_padding);
1995+
r.Expand(g.WindowsHoverPadding);
20191996
if (r.Contains(pos))
20201997
{
20211998
for (int j = 0; ignore_list[j]; j++)
@@ -2316,11 +2293,6 @@ ImGuiWindow* ImGuiTestContext::FindHoveredWindowAtPos(const ImVec2& pos)
23162293

23172294
static bool IsPosOnVoid(ImGuiContext& g, const ImVec2& pos)
23182295
{
2319-
#if IMGUI_VERSION_NUM < 19183
2320-
const ImVec2 hover_padding = g.WindowsHoverPadding;
2321-
#else
2322-
const ImVec2 hover_padding = ImVec2(g.WindowsBorderHoverPadding, g.WindowsBorderHoverPadding);
2323-
#endif
23242296
for (ImGuiWindow* window : g.Windows)
23252297
#ifdef IMGUI_HAS_DOCK
23262298
if (window->RootWindowDockTree == window && window->WasActive)
@@ -2329,7 +2301,7 @@ static bool IsPosOnVoid(ImGuiContext& g, const ImVec2& pos)
23292301
#endif
23302302
{
23312303
ImRect r = window->Rect();
2332-
r.Expand(hover_padding);
2304+
r.Expand(g.WindowsHoverPadding);
23332305
if (r.Contains(pos))
23342306
return false;
23352307
}
@@ -3525,11 +3497,7 @@ void ImGuiTestContext::MenuAction(ImGuiTestAction action, ImGuiTestRef ref)
35253497
ItemAction(Inputs->MouseButtonsValue ? ImGuiTestAction_Hover : ImGuiTestAction_Click, buf.c_str());
35263498
}
35273499
}
3528-
#if IMGUI_VERSION_NUM < 19187
35293500
current_window = GetWindowByRef(Str16f("//##Menu_%02d", depth).c_str());
3530-
#else
3531-
current_window = GetWindowByRef(Str16f("//###Menu_%02d", depth).c_str());
3532-
#endif
35333501
IM_CHECK_SILENT(current_window != nullptr);
35343502

35353503
path = p + 1;

libs/imgui_test_engine/imgui_te_context.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@
22
// (context when a running test + end user automation API)
33
// This is the main (if not only) interface that your Tests will be using.
44

5-
// This file is governed by the "Dear ImGui Test Engine License".
6-
// Details of the license are provided in the LICENSE.txt file in the same directory.
7-
85
#pragma once
96

107
#include "imgui.h"
@@ -170,7 +167,6 @@ struct IMGUI_API ImGuiTestGenericItemStatus
170167
void Clear() { memset(this, 0, sizeof(*this)); }
171168
void QuerySet(bool ret_val = false) { Clear(); QueryInc(ret_val); }
172169
void QueryInc(bool ret_val = false) { RetValue += ret_val; Hovered += ImGui::IsItemHovered(); Active += ImGui::IsItemActive(); Focused += ImGui::IsItemFocused(); Clicked += ImGui::IsItemClicked(); Visible += ImGui::IsItemVisible(); Edited += ImGui::IsItemEdited(); Activated += ImGui::IsItemActivated(); Deactivated += ImGui::IsItemDeactivated(); DeactivatedAfterEdit += ImGui::IsItemDeactivatedAfterEdit(); }
173-
void Draw() { ImGui::Text("Ret: %d, Hovered: %d, Active: %d, Focused: %d\nClicked: %d, Visible: %d, Edited: %d\nActivated: %d, Deactivated: %d, DeactivatedAfterEdit: %d", RetValue, Hovered, Active, Focused, Clicked, Visible, Edited, Activated, Deactivated, DeactivatedAfterEdit); }
174170
};
175171

176172
// Generic structure with various storage fields.
@@ -426,6 +422,7 @@ struct IMGUI_API ImGuiTestContext
426422
void ItemClose(ImGuiTestRef ref, ImGuiTestOpFlags flags = 0) { ItemAction(ImGuiTestAction_Close, ref, flags); }
427423
void ItemInput(ImGuiTestRef ref, ImGuiTestOpFlags flags = 0) { ItemAction(ImGuiTestAction_Input, ref, flags); }
428424
void ItemNavActivate(ImGuiTestRef ref, ImGuiTestOpFlags flags = 0) { ItemAction(ImGuiTestAction_NavActivate, ref, flags); }
425+
bool ItemOpenFullPath(ImGuiTestRef);
429426

430427
// Item/Widgets: Batch actions over an entire scope
431428
void ItemActionAll(ImGuiTestAction action, ImGuiTestRef ref_parent, const ImGuiTestActionFilter* filter = nullptr);

libs/imgui_test_engine/imgui_te_coroutine.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@
22
// (coroutine interface + optional implementation)
33
// Read https://github.com/ocornut/imgui_test_engine/wiki/Setting-Up
44

5-
// This file is governed by the "Dear ImGui Test Engine License".
6-
// Details of the license are provided in the LICENSE.txt file in the same directory.
7-
85
#include "imgui_te_coroutine.h"
96
#include "imgui.h"
107

libs/imgui_test_engine/imgui_te_coroutine.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@
22
// (coroutine interface + optional implementation)
33
// Read https://github.com/ocornut/imgui_test_engine/wiki/Setting-Up
44

5-
// This file is governed by the "Dear ImGui Test Engine License".
6-
// Details of the license are provided in the LICENSE.txt file in the same directory.
7-
85
#pragma once
96

107
#ifndef IMGUI_VERSION

0 commit comments

Comments
 (0)