You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Trouble detecting the end of editing a drag float when pressing Tab #1351
So I've written these helper functions to determine when dragging starts and ends for float drags (so I can implement undo/redo with the values from before starting the dragging and after the dragging stops)
Hello @onqtam, apologies for never answering this.
This has been solved as discussed in #1875 and other topics.
You can use IsItemDeactivated() or IsItemDeactivatedAfterEdit() added in 1.62, for the purpose you mention, and it works with tabbing out as well (the fix for tabbing out was part of 1.69),
Activity
onqtam commentedon Oct 5, 2017
I managed to fix my problem by changing this piece of code (using the latest version of ImGui):
to this:
Basically I clear the active id - just like when enter is pressed (10 lines above that).
Tabbing still works through fields properly - so far this doesn't seem to break anything but I bet I'm missing something. Any feedback?
ocornut commentedon Aug 27, 2020
Hello @onqtam, apologies for never answering this.
This has been solved as discussed in #1875 and other topics.
You can use
IsItemDeactivated()orIsItemDeactivatedAfterEdit()added in 1.62, for the purpose you mention, and it works with tabbing out as well (the fix for tabbing out was part of 1.69),Added ImGuiItemFlags_LiveEdit flag, and much-awaited support for disa…
Split ImGuiItemFlags_LiveEdit into ImGuiItemFlags_LiveEditText, ImGui…