Creation/Dev/Script/Client/TGUIAnimation

From Graal Bible


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.

Functions

Name Description
obj.createanimation()
obj.stopanimation()

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