animations: add go_at and go_at_mut#2868
Closed
edwloef wants to merge 1 commit intoiced-rs:masterfrom
Closed
Conversation
Contributor
Author
|
This was implemented as part of #2910 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I found myself calling
goa lot when receivingwindow::Event::RedrawRequested, where I already have an instant provided to me, so to avoid potential desync issues and to save a bunch of libc calls I added these two functions. Additionally, I could see this being useful to start animations in the past, e.g. if you want to start in the middle of a transition state, which as far as I can tell wasn't possible before since theDurationused for animation delay is unsigned.