Creation/Dev/Script/Client/TGUIAnimation: Difference between revisions
From Graal Bible
No edit summary |
Deas Voice (talk | contribs) |
||
(2 intermediate revisions by one other user not shown) | |||
Line 19: | Line 19: | ||
==== createanimation() ==== | ==== createanimation() ==== | ||
Creates an animation on the object, temporary modification of the values. | Creates an animation on the object, temporary modification of the values. | ||
==== transform transition ==== | |||
If you use the transition = "transform" then you can specify the destination bounds ({x,y,width,height}), the alpha value (0-1) and the rotation. The control will then be moved from the current position to the destination coordinates, this allows more fine-grained animations compared to moveinleft, fadein etc. However this actually moves the the control, compared to the other transitions which just animate the control and at the end set the visibility, while the control will still keep the original position. | |||
=Functions= | =Functions= | ||
Line 31: | Line 33: | ||
| obj.stopanimation() | | obj.stopanimation() | ||
| | | | ||
|- | |||
| obj.onAnimationFinished( transition ) | |||
| Lets you control what the animation should do after it's finished, eg. create a new animation | |||
|} | |} | ||
Latest revision as of 07:55, 14 September 2013
This article is information on a script object - a pre-defined type of variable with its own set of static variables and functions. It is intended for use with the GS2 scripting language.
Inherits from TGraalVar.
TGUIAnimation (TGraalVar): amplitude - float - amplitude for moveupdown, moveleftright and zoominout currenttime - float delay - float - the animation starts after the specified number of seconds duration - float - the animation will last the specified number of seconds interval - float - interval for moveupdown, moveleftright and zoominout tabfirstonshow - boolean - calls tabfirst() after showing the control, by default true timing - string - timing function: 'linear' or 'sinus', sinus is only used for moveupdown, moveleftright and zoominout transition - string - specifies the animation type: transform, fadeout, fadein, moveoutleft, moveinleft, moveoutright, moveinright, moveouttop, moveintop, moveoutbottom, moveinbottom, moveupdown, moveleftright, flipoutleft, flipinleft, flipoutright, flipinright, zoomin, zoomout, zoominout, growin, growout, shrinkin, shrinkout, rotateoutleft, rotateinleft, rotateoutright, rotateinright
Description
createanimation()
Creates an animation on the object, temporary modification of the values.
transform transition
If you use the transition = "transform" then you can specify the destination bounds ({x,y,width,height}), the alpha value (0-1) and the rotation. The control will then be moved from the current position to the destination coordinates, this allows more fine-grained animations compared to moveinleft, fadein etc. However this actually moves the the control, compared to the other transitions which just animate the control and at the end set the visibility, while the control will still keep the original position.
Functions
Name | Description |
obj.createanimation() | |
obj.stopanimation() | |
obj.onAnimationFinished( transition ) | Lets you control what the animation should do after it's finished, eg. create a new animation |
Example
new GuiButtonCtrl("Test_Button") { profile = GuiBlueButtonProfile; x = 10; y = 10; width = 100; height = 30; text = "Button"; } with ( Test_Button.createanimation() ) { duration = 0.5; transition = "fadein"; }
Source: TGuiAnimation