GuiTickCtrl Class Reference

#include <guiTickCtrl.h>

Inheritance diagram for GuiTickCtrl:

Inheritance graph
[legend]
List of all members.

Detailed Description

This Gui Control is designed to be subclassed to let people create controls which want to receive update ticks at a constant interval.

This class was created to be the Parent class of a control which used a DynamicTexture along with a VectorField to create warping effects much like the ones found in visualization displays for iTunes or Winamp. Those displays are updated at the framerate frequency. This works fine for those effects, however for an application of the same type of effects for things like Gui transitions the framerate-driven update frequency is not desirable because it does not allow the developer to be able to have any idea of a consistent user-experience.

Enter the ITickable interface. This lets the Gui control, in this case, update the dynamic texture at a constant rate of once per tick, even though it gets rendered every frame, thus creating a framerate-independent update frequency so that the effects are at a consistent speed regardless of the specifics of the system the user is on. This means that the screen-transitions will occur in the same time on a machine getting 300fps in the Gui shell as a machine which gets 150fps in the Gui shell.

See also:
ITickable


Public Member Functions

 DECLARE_CONOBJECT (GuiTickCtrl)

Protected Member Functions

virtual void interpolateTick (F32 delta)
 This method is called every frame and lets the control interpolate between ticks so you can smooth things as long as isProcessingTicks returns true when it is called on the object.
virtual void processTick ()
 This method is called once every 32ms if isProcessingTicks returns true when called on the object.
virtual void advanceTime (F32 timeDelta)
 This method is called once every frame regardless of the return value of isProcessingTicks and informs the object of the passage of time.

Private Types

typedef GuiControl Parent


Member Typedef Documentation


Member Function Documentation

virtual void GuiTickCtrl::interpolateTick ( F32  delta  )  [inline, protected, virtual]

This method is called every frame and lets the control interpolate between ticks so you can smooth things as long as isProcessingTicks returns true when it is called on the object.

Implements ITickable.

virtual void GuiTickCtrl::processTick (  )  [inline, protected, virtual]

This method is called once every 32ms if isProcessingTicks returns true when called on the object.

Implements ITickable.

Reimplemented in GuiAutoScrollCtrl, GuiRolloutCtrl, and GuiMenuBar.

virtual void GuiTickCtrl::advanceTime ( F32  timeDelta  )  [inline, protected, virtual]

This method is called once every frame regardless of the return value of isProcessingTicks and informs the object of the passage of time.

Implements ITickable.

Reimplemented in GuiAutoScrollCtrl.

GuiTickCtrl::DECLARE_CONOBJECT ( GuiTickCtrl   )