mirror of
https://github.com/ocornut/imgui.git
synced 2026-01-22 01:54:21 +00:00
Internals: Track ActiveIdHasBeenPressed (similar to ActiveIdHasBeenEdited). This is currently mostly for the benefit of the range_select branch. (#1861)
This commit is contained in:
parent
52a9f8bd3e
commit
0d4a2a2cd0
3 changed files with 8 additions and 2 deletions
|
|
@ -507,6 +507,8 @@ bool ImGui::ButtonBehavior(const ImRect& bb, ImGuiID id, bool* out_hovered, bool
|
|||
bool held = false;
|
||||
if (g.ActiveId == id)
|
||||
{
|
||||
if (pressed)
|
||||
g.ActiveIdHasBeenPressed = true;
|
||||
if (g.ActiveIdSource == ImGuiInputSource_Mouse)
|
||||
{
|
||||
if (g.ActiveIdIsJustActivated)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue