GDevelop icon indicating copy to clipboard operation
GDevelop copied to clipboard

Add "Tween easing (text)" as a new parameter/property type for extension creators

Open tristanbob opened this issue 2 years ago • 2 comments

Description

Tweens are a very powerful yet simple way to describe how an object changes over time.
A lot of extensions could leverage this power by letting users specify the Tween easing they want. Currently, this can only be done by the extension creator spending a long (and error-prone) process to add each easing.

Solution suggested

  • [ ] Add "Tween easing (text)" as a new parameter/property type for extension creators.

Users would have the same experience when selecting the easing in the extension as they do when editing a tween.

tristanbob avatar Apr 25 '22 20:04 tristanbob

If someone is facing this issue, a workaround is to close the project and open its json file with a text editor to copy paste the values.

This is a parameter with choices that can be copied:

                {
                  "codeOnly": false,
                  "defaultValue": "",
                  "description": "Easing",
                  "longDescription": "",
                  "name": "Easing",
                  "optional": false,
                  "supplementaryInformation": "[\"linear\",\"easeInQuad\",\"easeOutQuad\",\"easeInOutQuad\",\"easeInCubic\",\"easeOutCubic\",\"easeInOutCubic\",\"easeInQuart\",\"easeOutQuart\",\"easeInOutQuart\",\"easeInQuint\",\"easeOutQuint\",\"easeInOutQuint\",\"easeInOutSine\",\"easeInExpo\",\"easeOutExpo\",\"easeInOutExpo\",\"easeInCirc\",\"easeOutCirc\",\"easeInOutCirc\",\"easeOutBounce\",\"easeInBack\",\"easeOutBack\",\"easeInOutBack\",\"elastic\",\"swingFromTo\",\"swingFrom\",\"swingTo\",\"bounce\",\"bouncePast\",\"easeFromTo\",\"easeFrom\",\"easeTo\"]",
                  "type": "stringWithSelector"
                }

The parameter where choices must be pasted can be searched using its description.

D8H avatar May 18 '22 12:05 D8H

What could be an issue when implementing this change request is that Tween is an extension and parameter types are defined in Core where tween concepts shouldn't be known.

D8H avatar May 18 '22 12:05 D8H