Internals: Track ActiveIdHasBeenPressed (similar to ActiveIdHasBeenEdited). This is currently mostly for the benefit of the range_select branch. (#1861)

This commit is contained in:
omar
2019-02-01 12:04:42 +01:00
parent 52a9f8bd3e
commit 0d4a2a2cd0
3 changed files with 8 additions and 2 deletions

View File

@ -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)