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

Possibility to stop all animations of a gui node at the same time #6553

Open
coderm4ster opened this issue Apr 26, 2022 · 5 comments · May be fixed by #6592
Open

Possibility to stop all animations of a gui node at the same time #6553

coderm4ster opened this issue Apr 26, 2022 · 5 comments · May be fixed by #6592
Labels
engine Issues related to the Defold engine feature request A suggestion for a new feature gui Issues related to gui components

Comments

@coderm4ster
Copy link
Contributor

Is your feature request related to a problem? Please describe (REQUIRED):
Referring to stopping all animations of the game object property at the same time, which was implemented by request #6492, this same could be done similarly on the gui nodes.

Describe the solution you'd like (REQUIRED):
Currently, the gui.cancel_animation function can be used to stop animations on a gui node. I don't know the reason, but it didn't get an "s" suffix compared to the go.cancel_animations function name (It confused me several times). Maybe it would be good to unify the two names.

Implementation can be done in several ways:

  1. The old name remains and the second parameter will be optional: gui.cancel_animation(node, [property])
  2. Along with the old name, a new gui.cancel_animations function will be introduced which will have only one parameter (to put it mildly, it would be quite confusing): gui.cancel_animations(node)
  3. The old name becomes deprecated and is replaced by a new gui.cancel_animations function similar to the parameterization specified in the first point: gui.cancel_animations(node, [property])

Perhaps option 3 is the most appropriate.

@coderm4ster coderm4ster added the feature request A suggestion for a new feature label Apr 26, 2022
@britzl britzl added the gui Issues related to gui components label Apr 26, 2022
@coderm4ster
Copy link
Contributor Author

@britzl and @JCash could you please share your opinion about which option would be the best?

I would try to make the necessary changes. Or will it be discussed first? Thanks!

@britzl
Copy link
Contributor

britzl commented Apr 28, 2022

Currently, the gui.cancel_animation function can be used to stop animations on a gui node. I don't know the reason, but it didn't get an "s" suffix compared to the go.cancel_animations function name (It confused me several times). Maybe it would be good to unify the two names.

Good point. animation vs animations is inconsitent and I'm not sure why. In both cases you can only have one animation running per property on a game object or node.

3. The old name becomes deprecated and is replaced by a new gui.cancel_animations function similar to the parameterization specified in the first point: gui.cancel_animations(node, [property])

I think I prefer this solution. Or the other way around and change to go.cancel_animation(url, [property]). I'd appreciate some input from @JCash as well.

@coderm4ster
Copy link
Contributor Author

For now, I've implemented the first option. I don’t want to arbitrarily change function names until I get confirmation of it. The second option suggested by @britzl is that go.cancel_animation can also be good, maybe even better than the gui.cancel_animations I suggest. Feedback from @JCash would be helpful.

@JCash
Copy link
Contributor

JCash commented Oct 17, 2022

I don't know the reason, but it didn't get an "s" suffix compared to the go.cancel_animations function name

The go.cancel_animations() function arrived two years later than the other one, and presumably they thought that this was a better interface (which I agree with).

Good point. animation vs animations is inconsitent and I'm not sure why. In both cases you can only have one animation running per property on a game object or node.

But you can call go.cancel_animations(".") to end all animatiions on that game object.

Given the nature of the go.cancel_animations() I prefer we move towards a gui.cancel_animations()as well, and we deprecate (remove the documentation), from the old function.

@britzl
Copy link
Contributor

britzl commented Oct 17, 2022

Excellent! Thanks @JCash ! @coderm4ster are you still up for completing this PR and making the necessary changes?

@AGulev AGulev added the engine Issues related to the Defold engine label May 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
engine Issues related to the Defold engine feature request A suggestion for a new feature gui Issues related to gui components
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants