|
YSTest
PreAlpha_b380_20130211
The YSLib Test Project
|
输入计时器。 More...
#include <ygui.h>

Public Types | |
| enum | HeldStateType { Free = 0, Pressed = 1, Held = 2 } |
| 输入保持状态。 More... | |
| typedef Timers::Duration | Duration |
Public Member Functions | |
| InputTimer (const Duration &=Timers::TimeSpan(1000U)) | |
| void | Delay (const Duration &d) |
| 延迟。 | |
| bool | Refresh (HeldStateType &, const Duration &=Timers::TimeSpan(240), const Duration &=Timers::TimeSpan(120)) |
| 重复检测输入接触保持状态。 | |
| void | Reset () |
| 复位状态。 | |
Private Attributes | |
| Timers::Timer | timer |
| InputTimer::InputTimer | ( | const Duration & | d = Timers::TimeSpan(1000U) | ) |
|
inline |
| bool InputTimer::Refresh | ( | HeldStateType & | s, |
| const Duration & | initial_delay = Timers::TimeSpan(240), |
||
| const Duration & | repeated_delay = Timers::TimeSpan(120) |
||
| ) |
重复检测输入接触保持状态。
Definition at line 68 of file ygui.cpp.
References YSLib::Activate(), Free, Held, Pressed, YSLib::Timers::Timer::Refresh(), YSLib::Timers::Timer::SetInterval(), timer, and YB_UNLIKELY.

| void InputTimer::Reset | ( | ) |
复位状态。
Definition at line 101 of file ygui.cpp.
References Deactivate(), YSLib::Timers::Timer::SetInterval(), and timer.
Referenced by YSLib::Components::GUIState::Reset(), and YSLib::Components::GUIState::ResetHeldState().


|
private |