-
-
Notifications
You must be signed in to change notification settings - Fork 10.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Widgets returning true only when they change value? #956
Comments
See #820
Those helpers haven't been added to the main branch yet so we can keep this new issue open.
|
Thanks for the quick replay, For the hack, it's a pity that it does not work with PushID and thus with DragFloat2/3/4. |
It's not to do with PushId(), there was a problem with IsItemActive() within group which was fixed so it may just work now.
… On 29 Dec 2016, at 18:02, ongamex ***@***.***> wrote:
Thanks for the quick replay,
For the hack, it's a pity that it does not work with PushID and thus with DragFloat2/3/4.
―
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Yeah, the way I solved my problem is using the "hack" from #820 and basically duplicating the code for DragFloatN and tweaking it a little bit. Here is the code just in case someone else needs it: |
So the problem is that the proposed solution for |
Is there any progress in this? I think that it's a pretty important feature to have, seeing how many GUIs use this behavior as "PropertyChanged" event. |
It's not as easy as it sounds because of the architecture of InputText, which needs to be cleaned up. No progress on it yet. |
Okay, maybe anything I could help with? Or maybe changes are going to be pretty radical? |
@ongamex @eliasdaler |
I'm trying to implement a simple Undo/Redo for my level editor.
I use ImGui::DragFloat (and others..) to manipulate the values that I need to have history.
These values are updated when ImGui::DragFloat (and others) returns true.
The problem that I have is that ImGui::DragFloat returns true even when 'sliding' the widget, I want to get notified somehow when to user stopped interacting with the ImGui::DragFloat (for example edited with the keyboard and hit enter, or the user released the mouse) in order to create an undoable state only then.
is there a way to achieve this?
The text was updated successfully, but these errors were encountered: