mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-05 04:28:47 +02:00
Added IsMouseReleased() helper (#248)
This commit is contained in:
5
imgui.h
5
imgui.h
@ -356,6 +356,7 @@ namespace ImGui
|
||||
IMGUI_API bool IsMouseDown(int button);
|
||||
IMGUI_API bool IsMouseClicked(int button, bool repeat = false);
|
||||
IMGUI_API bool IsMouseDoubleClicked(int button);
|
||||
IMGUI_API bool IsMouseReleased(int button);
|
||||
IMGUI_API bool IsMouseHoveringWindow(); // is mouse hovering current window ("window" in API names always refer to current window)
|
||||
IMGUI_API bool IsMouseHoveringAnyWindow(); // is mouse hovering any active imgui window
|
||||
IMGUI_API bool IsMouseHoveringRect(const ImVec2& rect_min, const ImVec2& rect_max);// is mouse hovering given bounding rect
|
||||
@ -701,8 +702,10 @@ struct ImGuiIO
|
||||
ImVec2 MouseClickedPos[5]; // Position at time of clicking
|
||||
float MouseClickedTime[5]; // Time of last click (used to figure out double-click)
|
||||
bool MouseDoubleClicked[5]; // Has mouse button been double-clicked?
|
||||
bool MouseReleased[5]; // Mouse button went from !Down to Down
|
||||
bool MouseDownOwned[5]; // Track if button was clicked inside a window. We don't request mouse capture from the application if click started outside ImGui bounds.
|
||||
float MouseDownTime[5]; // Time the mouse button has been down
|
||||
float MouseDownDuration[5]; // Time the mouse button has been down
|
||||
float MouseDownDurationPrev[5]; // Previous time the mouse button has been down
|
||||
float MouseDragMaxDistanceSqr[5]; // Squared maximum distance of how much mouse has traveled from the click point
|
||||
float KeysDownTime[512]; // Time the keyboard key has been down
|
||||
|
||||
|
Reference in New Issue
Block a user