Skip to content
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

How to implement animation on item release? (LastActiveIdTimer for item active) #3785

Closed
mooko-dev opened this issue Feb 4, 2021 · 1 comment

Comments

@mooko-dev
Copy link

Hello!
I want to implement an animation that will start when an item is released. I know how to do that for item activation, I can use LastActiveIdTimer, but is there a solution for an item release?
Is there something like item data custom storage where I could save my data for specific ImGuiID? I could save the release timer for a specific item, set it to null when the item is active otherwise add g.IO.DeltaTime.
Hope for your help! I will be glad to any suggestions on how to implement this in the best way!
Thanks in advance!

@ocornut
Copy link
Owner

ocornut commented Feb 4, 2021

Hello,

Is there something like item data custom storage where I could save my data for specific ImGuiID?

You can use a ImGuiStorage (your own or one inside a window) or use your own storage.

I haven't experimented with this since I wrote #1537 but I think down the line we'll want to provide dedicated timer storage helpers for facilitate this sort of things while handling >1 simultaneous timer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants