summaryrefslogtreecommitdiff
path: root/imgui_helper_widgets.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'imgui_helper_widgets.cpp')
-rw-r--r--imgui_helper_widgets.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/imgui_helper_widgets.cpp b/imgui_helper_widgets.cpp
index e55a5e7..231b4b9 100644
--- a/imgui_helper_widgets.cpp
+++ b/imgui_helper_widgets.cpp
@@ -85,9 +85,10 @@ ImGui_Brush_CalcMousePos(project_state *State, ImGuiIO &io, ImVec2 MouseDelta, i
return MousePos;
}
-static void
+static bool32
ImGui_TestBoxSelection_Point(ImVec2 Pos, ImGuiIO &io, bool32 *Test)
{
+ bool32 Result = 0;
real32 Y_Top = (io.MouseClickedPos[0].y < io.MousePos.y) ? io.MouseClickedPos[0].y : io.MousePos.y;
real32 Y_Bottom = (io.MouseClickedPos[0].y > io.MousePos.y) ? io.MouseClickedPos[0].y : io.MousePos.y;
real32 X_Left = (io.MouseClickedPos[0].x < io.MousePos.x) ? io.MouseClickedPos[0].x : io.MousePos.x;
@@ -98,8 +99,10 @@ ImGui_TestBoxSelection_Point(ImVec2 Pos, ImGuiIO &io, bool32 *Test)
{
if (!(*Test)) {
*Test = 1;
+ Result = 1;
}
} else if (!io.KeyShift) {
*Test = 0;
}
+ return Result;
}