GuiAutoScrollCtrl
Engine/source/gui/containers/guiAutoScrollCtrl.h
A control that automatically scrolls its child control upwards.
Callbacks
DECLARE_CALLBACK(void , onTick , () )
DECLARE_CALLBACK(void , onStart , () )
DECLARE_CALLBACK(void , onComplete , () )
DECLARE_CALLBACK(void , onReset , () )
Protected Types
Phase { PhaseInitial PhaseScrolling PhaseComplete PhaseWait }
Protected Attributes
Border to put around scrolled child control.
The time scrolling was completed.
Current phase in the scrolling animation.
Current scrolling position.
The current animation time.
The direction in which to scroll.
bool
If true, scrolling will start from the beginning once finished.
Seconds to wait after scrolling is complete before reseting the control to the initial state (only if mIsLooping is true).
bool
Whether to scroll the child control completely out of sight.
Speed at which to scroll in pixels per second.
Seconds to wait before starting to scroll.
Protected Functions
bool
_reset(GuiControl * control)
Public Functions
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.
childResized(GuiControl * child)
Called when a child control of the object is resized.
DECLARE_CATEGORY("Gui Containers" )
DECLARE_DESCRIPTION("A container that automatically scrolls its child <a href="/coding/file/guieditctrl_8cpp/#guieditctrl_8cpp_1abb04e3738c4c5a96b3ade6fa47013a6c">control</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">upwards.\n</a>" "Can be used, <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1a2732ab74fa0237854c2ba0f75f88a624">for</a> example, <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1a2732ab74fa0237854c2ba0f75f88a624">for</a> credits screens." )
Called after any property of the object is changed in the world editor.
onChildAdded(GuiControl * child)
Called when this object has a new child.
onChildRemoved(GuiControl * child)
Called when one of this objects children is removed.
bool
onWake()
Called when this object is asked to wake up returns true if it's actually awake at the end.
This method is called once every 32ms if isProcessingTicks returns true when called on the object.
Public Static Functions
Detailed Description
A control that automatically scrolls its child control upwards.
Callbacks
DECLARE_CALLBACK(void , onTick , () )
DECLARE_CALLBACK(void , onStart , () )
DECLARE_CALLBACK(void , onComplete , () )
DECLARE_CALLBACK(void , onReset , () )
Public Types
Direction
Enumerator
- Up
- Down
- Left
- Right
Scrolling direction.
typedef GuiTickCtrl Parent
Protected Types
Phase
Enumerator
- PhaseInitial
Waiting to begin scrolling.
- PhaseScrolling
Currently scrolling.
- PhaseComplete
Scrolling complete.
- PhaseWait
Wait before starting a new loop.
Protected Attributes
S32 mChildBorder
Border to put around scrolled child control.
F32 mCompleteTime
The time scrolling was completed.
Phase mCurrentPhase
Current phase in the scrolling animation.
F32 mCurrentPosition
Current scrolling position.
This is kept separate from the control's current position value since we will receive time updates in increments less than a second and thus need to have this value in floating-point.
F32 mCurrentTime
The current animation time.
Direction mDirection
The direction in which to scroll.
bool mIsLooping
If true, scrolling will start from the beginning once finished.
F32 mResetDelay
Seconds to wait after scrolling is complete before reseting the control to the initial state (only if mIsLooping is true).
bool mScrollOutOfSight
Whether to scroll the child control completely out of sight.
F32 mScrollSpeed
Speed at which to scroll in pixels per second.
F32 mStartDelay
Seconds to wait before starting to scroll.
Protected Functions
_getScrollAmount()
_getScrollAxis()
_isScrollComplete()
_reset(GuiControl * control)
Public Functions
GuiAutoScrollCtrl()
advanceTime(F32 timeDelta)
Reimplemented from: GuiTickCtrl
childResized(GuiControl * child)
Reimplemented from: GuiControl
DECLARE_CATEGORY("Gui Containers" )
DECLARE_CONOBJECT(GuiAutoScrollCtrl )
DECLARE_DESCRIPTION("A container that automatically scrolls its child <a href="/coding/file/guieditctrl_8cpp/#guieditctrl_8cpp_1abb04e3738c4c5a96b3ade6fa47013a6c">control</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">upwards.\n</a>" "Can be used, <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1a2732ab74fa0237854c2ba0f75f88a624">for</a> example, <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1a2732ab74fa0237854c2ba0f75f88a624">for</a> credits screens." )
inspectPostApply()
Reimplemented from: SimObject
onChildAdded(GuiControl * child)
Reimplemented from: GuiControl
onChildRemoved(GuiControl * child)
Reimplemented from: GuiControl
onSleep()
Reimplemented from: GuiControl
onWake()
Reimplemented from: GuiControl
processTick()
Reimplemented from: GuiTickCtrl
reset()
resize(const Point2I & newPosition, const Point2I & newExtent)
Reimplemented from: GuiControl