2.0 KiB
2.0 KiB
With animations, you can create a beautiful experience for users while interacting with your program. There are 2 types of animations, predefined animations and custom animations. By using add and wait you can create custom animations (calls). Pre-defined methods are for example move, offset, size, changeText,...
:setObject always sets the object on what pre-defined methods should apply on.
When calling a pre-defined animation it will check what is safed as object (:setObject) and will calculate the animation methods based on that which means you won't be able to change the object on the fly - you will always have to recreate the animation itself
| add | Adds a new custom function to call at the current time |
| wait | Adds a amount to the animation time |
| play | Plays the animation |
| cancel | Cancels the animation |
| addMode | Adds custom easings |
| setMode | Changes the current easing-calculation |
| setObject | Sets an object on which predefined animations should work on |
| move | Predefined animation: moves the object to a new position |
| offset | Predefined animation: Changes the offset of that object |
| size | Predefined animation: Changes the size on a object |
| changeText | Predefined animation: Changes the text (object needs a setText method) |
| changeTextColor | Predefined animation: changes the foreground/textcolor on a object |
| changeBackground | Predefined animation: changes the background on a object |
Events
| onStart | Gets called as soon as the animation is started |
| onDone | Gets called as soon as the animation has finished |