mirror of
https://github.com/Drezil/imgui.git
synced 2024-11-15 01:17:00 +00:00
Added IsPosHoveringAnyWindow()
This commit is contained in:
parent
d5ed586d70
commit
85672fec2e
@ -1745,6 +1745,11 @@ bool IsMouseHoveringAnyWindow()
|
|||||||
return g.HoveredWindow != NULL;
|
return g.HoveredWindow != NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool IsPosHoveringAnyWindow(const ImVec2& pos)
|
||||||
|
{
|
||||||
|
return ImGui::FindHoveredWindow(pos, false) != NULL;
|
||||||
|
}
|
||||||
|
|
||||||
static bool IsKeyPressedMap(ImGuiKey key, bool repeat)
|
static bool IsKeyPressedMap(ImGuiKey key, bool repeat)
|
||||||
{
|
{
|
||||||
ImGuiState& g = GImGui;
|
ImGuiState& g = GImGui;
|
||||||
|
7
imgui.h
7
imgui.h
@ -260,9 +260,10 @@ namespace ImGui
|
|||||||
bool IsKeyPressed(int key_index, bool repeat = true); // key_index into the keys_down[512] array, imgui doesn't know the semantic of each entry
|
bool IsKeyPressed(int key_index, bool repeat = true); // key_index into the keys_down[512] array, imgui doesn't know the semantic of each entry
|
||||||
bool IsMouseClicked(int button, bool repeat = false);
|
bool IsMouseClicked(int button, bool repeat = false);
|
||||||
bool IsMouseDoubleClicked(int button);
|
bool IsMouseDoubleClicked(int button);
|
||||||
bool IsMouseHoveringWindow(); // is hovering current window ("window" in API names always refer to current window)
|
bool IsMouseHoveringWindow(); // is mouse hovering current window ("window" in API names always refer to current window)
|
||||||
bool IsMouseHoveringAnyWindow(); // is hovering any active imgui window
|
bool IsMouseHoveringAnyWindow(); // is mouse hovering any active imgui window
|
||||||
bool IsMouseHoveringBox(const ImVec2& box_min, const ImVec2& box_max); // is hovering given bounding box
|
bool IsMouseHoveringBox(const ImVec2& box_min, const ImVec2& box_max); // is mouse hovering given bounding box
|
||||||
|
bool IsPosHoveringAnyWindow(const ImVec2& pos); // is given position hovering any active imgui window
|
||||||
ImVec2 GetMousePos(); // shortcut to ImGui::GetIO().MousePos provided by user, to be consistent with other calls
|
ImVec2 GetMousePos(); // shortcut to ImGui::GetIO().MousePos provided by user, to be consistent with other calls
|
||||||
float GetTime();
|
float GetTime();
|
||||||
int GetFrameCount();
|
int GetFrameCount();
|
||||||
|
Loading…
Reference in New Issue
Block a user