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

Animate quizzes #15

Closed
NathanLovato opened this issue Dec 28, 2021 · 3 comments · Fixed by #247
Closed

Animate quizzes #15

NathanLovato opened this issue Dec 28, 2021 · 3 comments · Fixed by #247
Labels
enhancement New feature or request user experience Improvement to the interface or user interactions
Milestone

Comments

@NathanLovato
Copy link
Contributor

When giving the right answer, the quizz panel pops instantly. It’d be nice to animate the height. We could also animate the panel when showing a hint, see Consider adding optional hint to quizzes

@NathanLovato NathanLovato added enhancement New feature or request user experience Improvement to the interface or user interactions labels Dec 28, 2021
@NathanLovato NathanLovato added this to the 0.2 milestone Dec 28, 2021
@NathanLovato NathanLovato modified the milestones: 0.2, 0.3 Jan 26, 2022
@mathmods
Copy link
Contributor

I'm working on this enhancement.

I'm considering using the existing tween object on a ColorRect (invisible by modulation) to change the size of the container without jumps. (Also adding a modulation tween to the resultview to ensure text doesn't "pop").

We could also animate the panel when showing a hint, see Consider adding optional hint to quizzes

With this I'll consider making a "_switch_view" function that takes two views and animates the transition between the elements.

@NathanLovato
Copy link
Contributor Author

Thanks for the help! Tweening the rect_min_size of some element would definitely be the way to go. Youĺl likely have to tween the size of the root container of the quiz UI so it properly moves elements around it in the lesson UI.

You can also set some container node to Clip Content during the transition to animate the container size. I think Revealer.tscn is a good example of how to approach UI animation like that.

And I see the referenced issue in my top post didn´t get linked correctly, itś #16

@mathmods
Copy link
Contributor

Thanks for the tips! I'll look into that.
Clipping content will probably look better in code (and practice) than the thing I attempted last night (yielding to timers to hide and show the items).

And I now see how the help is supposed to work, I'll deal with that once I've gotten it to actually change size properly.
Might add an internal function that just checks the size of it's own contents and then animates to fit. (Upon size change of the margin container perhaps)

@NathanLovato NathanLovato linked a pull request Feb 1, 2022 that will close this issue
3 tasks
@NathanLovato NathanLovato linked a pull request Feb 3, 2022 that will close this issue
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request user experience Improvement to the interface or user interactions
Projects
None yet
2 participants