From 0047b9ffc06d65f53d8101c5393f4943c1011c03 Mon Sep 17 00:00:00 2001 From: Fox Caminiti Date: Mon, 28 Nov 2022 00:18:06 -0500 Subject: fancy hotkey ui aside --- imgui_helper_widgets.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'imgui_helper_widgets.cpp') 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; } -- cgit v1.2.3