GUIAnimation
GUIAnimation module by monkey_05_06.
Description
Provides functions for animating GUI background images.
Macros (#define-s)
GUIANIMATION_VERSION
Defines the current version of the module.
GUIANIMATION_VERSION_100
Defines version 1.0 of the module.
Functions and Properties
GUIAnimation.End
static void GUIAnimation.End(GUI* theGUI, optional bool restoreBackground)
Stops the animation for THEGUI. If RESTOREBACKGROUND is true (the default) then THEGUI's background will be restored to the graphic used prior to the animation.
See Also: GUIAnimation.Start
GUIAnimation.GetDelay
static int GUIAnimation.GetDelay(GUI* theGUI)
Returns the animation delay for THEGUI or -1 if THEGUI is not animating.
GUIAnimation.GetFrame
static int GUIAnimation.GetFrame(GUI* theGUI)
Returns the current frame of THEGUI's animation or -1 if it's not animating.
See Also: GUIAnimation.GetLoop, GUIAnimation.GetView, GUIAnimation.GetViewFrame
GUIAnimation.GetLoop
static int GUIAnimation.GetLoop(GUI* theGUI)
Returns the current loop of THEGUI's animation or -1 if it's not animating.
See Also: GUIAnimation.GetFrame, GUIAnimation.GetView, GUIAnimation.GetViewFrame
GUIAnimation.GetView
static int GUIAnimation.GetView(GUI* theGUI)
Returns the current view of THEGUI's animation or -1 if it's not animating.
See Also: GUIAnimation.GetFrame, GUIAnimation.GetLoop, GUIAnimation.GetViewFrame
GUIAnimation.GetViewFrame
static ViewFrame* GUIAnimation.GetViewFrame(GUI* theGUI)
Returns a ViewFrame* for THEGUI's current frame or null if it's not animating.
See Also: GUIAnimation.GetFrame, GUIAnimation.GetLoop, GUIAnimation.GetView
GUIAnimation.IsAnimating
static bool GUIAnimation.IsAnimating(GUI* theGUI)
Returns whether THEGUI is currently animating or not.
GUIAnimation.IsRandomized
static bool GUIAnimation.IsRandomized(GUI* theGUI)
Returns whether the animation for THEGUI is randomized or not.
GUIAnimation.Start
static void GUIAnimation.Start(GUI* theGUI, int view, int loop, optional int frame, optional int delay, optional bool randomize)
Starts THEGUI animating. If RANDOMIZE is true then THEGUI's frame will be randomized from the available frames instead of running a normal animation.
FRAME defaults to 1.
DELAY defaults to 5.
RANDOMIZE defaults to false.
See Also: GUIAnimation.End
Caveats
No support for flipped sprites.
Licensing
// Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to // deal in the Software without restriction, including without limitation the // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or // sell copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS // IN THE SOFTWARE.
Changelog
Version 1.0
Date: 17 November 2006, 11:00 P.M. GMT -6:00 Author: monkey_05_06 Description: First public version of module.