ContextAction
Private Attributes
our button we're holding
minimum time to qualify as 'held'.
Public Attributes
bool
do we be tickin?
bool
Button is no longer being pressed!
Console function to call with new values if we held over
bool
did we, at some point in the process, hold the button?
Event value from our key event.
bool
does this only care if we're holding?
true means that it only fires a function while holding
false time-contexts it
bool
Do we return back our time held?
Our timestamp when we first pressed.
Public Functions
ContextAction(StringTableEntry func, F32 minHoldTime, ActionMap::Node * button, bool holdOnly)
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.
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.
This method is called once every 32ms if isProcessingTicks returns true when called on the object.
Detailed Description
Private Attributes
ActionMap::Node * mButton
our button we're holding
F32 mMinHoldTime
minimum time to qualify as 'held'.
If we hold less than this,
it's a 'press', otherwise it's a 'held'
Public Attributes
bool mActive
do we be tickin?
bool mBreakEvent
Button is no longer being pressed!
StringTableEntry mConsoleFunctionHeld
Console function to call with new values if we held over
a certain time.
bool mDidHold
did we, at some point in the process, hold the button?
F32 mEventValue
Event value from our key event.
bool mHoldOnly
does this only care if we're holding?
true means that it only fires a function while holding
false time-contexts it
bool mReturnHoldTime
Do we return back our time held?
F32 mStartTime
Our timestamp when we first pressed.
Public Functions
ContextAction(StringTableEntry func, F32 minHoldTime, ActionMap::Node * button, bool holdOnly)
advanceTime(F32 timeDelta)
Reimplemented from: ITickable
interpolateTick(F32 delta)
Reimplemented from: ITickable
processTick()
Reimplemented from: ITickable