mirror of
https://github.com/ocornut/imgui.git
synced 2024-11-24 15:50:25 +01:00
Added IsAnyItemActive()
This commit is contained in:
parent
c1f20f03c5
commit
f2752584e2
@ -295,6 +295,7 @@
|
||||
! style: store rounded corners in texture to use 1 quad per corner (filled and wireframe). so rounding have minor cost.
|
||||
- style: checkbox: padding for "active" color should be a multiplier of the
|
||||
- style: colorbox not always square?
|
||||
- text: simple markup language for color change?
|
||||
- log: LogButtons() options for specifying depth and/or hiding depth slider
|
||||
- log: have more control over the log scope (e.g. stop logging when leaving current tree node scope)
|
||||
- log: be able to right-click and log a window or tree-node into tty/file/clipboard / generalized context menu?
|
||||
@ -2437,6 +2438,12 @@ bool ImGui::IsItemActive()
|
||||
return false;
|
||||
}
|
||||
|
||||
bool ImGui::IsAnyItemActive()
|
||||
{
|
||||
ImGuiState& g = *GImGui;
|
||||
return g.ActiveId != 0;
|
||||
}
|
||||
|
||||
ImVec2 ImGui::GetItemBoxMin()
|
||||
{
|
||||
ImGuiWindow* window = GetCurrentWindow();
|
||||
|
1
imgui.h
1
imgui.h
@ -327,6 +327,7 @@ namespace ImGui
|
||||
// Utilities
|
||||
IMGUI_API bool IsItemHovered(); // was the last item hovered by mouse?
|
||||
IMGUI_API bool IsItemActive(); // was the last item active? (e.g. button being held, text field being edited- items that don't interact will always return false)
|
||||
IMGUI_API bool IsAnyItemActive(); //
|
||||
IMGUI_API ImVec2 GetItemBoxMin(); // get bounding box of last item
|
||||
IMGUI_API ImVec2 GetItemBoxMax(); // get bounding box of last item
|
||||
IMGUI_API bool IsClipped(const ImVec2& item_size); // to perform coarse clipping on user's side (as an optimization)
|
||||
|
Loading…
Reference in New Issue
Block a user