|
Rebel Fork Framework
|
#include <Urho3D/XR/VRUtils.h>
Public Attributes | |
| int | targetCode_ |
| Target code we're looking for. | |
| float | shortPressWindow_ |
| Time length after which short-press is forbidden. | |
| float | holdDuration_ |
| Time length to constitute a long-press. | |
| int | currentCode_ = { 0 } |
| State, current action code received from input. | |
| float | time_ = { 0.0f } |
| State, current time in hold. | |
| bool | alreadyDone_ = { false } |
| State, flag for not to respond. | |
| float | fraction_ = { 0.0f } |
| State, current hold duration fraction. If zero then holding is not active. | |
Helper struct to manage variables for making calls to the above functions to manage variable coded button presses, reduces boiler-plate involving state variables. Not intended for varying usage, only one of the check methods should be used for a given ButtonCommand instance. Changing the method that will be called requires calling Reset() to flush the state. To use for a real button, set targetCode_ to true and use bool to int conversion in the check functions.