LibTransition-1.0 API
LibTransition-1.0 API
LibTransition:Attach(target_frame
)
Attaches the shorthand transition functions to the given frame.
Parameters
- target_frame
- The frame to attach to.
Return values
- none
Usage
local libtrans = LibStub("LibTransition-1.0"); local frame = CreateFrame("Frame"); frame:SetPoint("CENTER", UIParent, "CENTER", 0, 0); frame:SetWidth(300); frame:SetHeight(200); libtrans:Attach(frame);
LibTransition:Queue(target_frame
, animation_type
, ...)
Queues the given transition animation to the specified frame.
Parameters
- target_frame
- The frame to queue for a transition
Return values
- none
See the shorthand functions for information on the different transition types and their arguments.
LibTransition:Run(target_frame
)
Runs the animation queue for the specified frame.
Parameters
- target_frame
- The frame whose queue you wish to run.
Return values
- none
Transition types
Frame:FadeIn(duration
, [stopOpacity]
)
Fades in a frame.
Parameters
- duration
- The duration, in seconds, the fading will take.
- stopOpacity
- If specified, the fading will stop at the given opacity level (between 0 and 1)
Return values
- none
Manually queuing
FadeIn() is similar to calling:
LibTransition:Queue(frame, "FadeIn", duration, stopOpacity); LibTransition:Run(frame);
Frame:FadeOut(duration
, [stopOpacity]
)
Fades out a frame.
Parameters
- duration
- The duration, in seconds, the fading will take.
- stopOpacity
- If specified, the fading will stop at the given opacity level (between 0 and 1)
Return values
- none
Manually queuing
FadeOut() is similar to calling:
LibTransition:Queue(frame, "FadeOut", duration, stopOpacity); LibTransition:Run(frame);
Frame:Wait(duration
)
Waits (pauses the animation queue) for a given time. This is useful for queuing multiple transitions at once with a timed interval between each transition.
Parameters
- duration
- The duration, in seconds, of the queue pause.
Return values
- none
Manually queuing
Wait() is similar to calling:
LibTransition:Queue(frame, "Wait", duration); LibTransition:Run(frame);
Frame:Drop([bounce]
)
Drops a frame and lets gravity works its magic.
Parameters
- bounce
- If set to
true
, the frame will bounce off the "floor" of the screen as if it had some elasticity to it.
Return values
- none
Manually queuing
Drop() is similar to calling:
LibTransition:Queue(frame, "Drop", bounce); LibTransition:Run(frame);
Frame:PushIn(duration
, direction
)
Pushes in a frame in the given direction.
Parameters
- duration
- The duration, in seconds, the movement will take.
- direction
- The direction of the push. If you wish to push in a frame from the left side of the screen to it's current position, you would have to push it
Right
. - Accepted values are:
Left, Right, Up, Down
Return values
- none
Manually queuing
PushIn() is similar to calling:
LibTransition:Queue(frame, "PushIn", duration, direction); LibTransition:Run(frame);
Frame:PushOut(duration
, direction
)
Pushes out a frame in the given direction.
Parameters
- duration
- The duration, in seconds, the movement will take.
- direction
- The direction of the push. If you wish to push out a frame to the left side of the screen to it's current position, you would have to push it
Left
. - Accepted values are:
Left, Right, Up, Down
Return values
- none
Manually queuing
PushOut() is similar to calling:
LibTransition:Queue(frame, "PushOut", duration, direction); LibTransition:Run(frame);
Frame:Squeeze(duration
, orientation
)
Squeeze the life out of a frame till it's no more!
Parameters
- duration
- The duration, in seconds, the squeeze will take.
- orientation
- The orientation of the squeezing.
- Accepted values are:
Horizontal, Vertical
Return values
- none
Manually queuing
Squeeze() is similar to calling:
LibTransition:Queue(frame, "Squeeze", duration, orientation); LibTransition:Run(frame);
Frame:Stretch(duration
, orientation
)
Stretch out a frame from thin air to it's predefinedt size.
Parameters
- duration
- The duration, in seconds, the stretch will take.
- orientation
- The orientation of the stretching.
- Accepted values are:
Horizontal, Vertical
Return values
- none
Manually queuing
Stretch() is similar to calling:
LibTransition:Queue(frame, "Stretch", duration, orientation); LibTransition:Run(frame);
Comments