![]() |
Divide Framework 0.1
A free and open-source 3D Framework under heavy development
|
#include <AutoKeyRepeat.h>
Public Member Functions | |
virtual | ~AutoRepeatKey ()=default |
AutoRepeatKey (D64 repeatDelay=0.035, D64 initialDelay=0.300) noexcept | |
Default constructor. | |
void | begin (const KeyEvent &evt) noexcept |
Called when a key is pressed. | |
void | end (const KeyEvent &evt) noexcept |
Called when a key is released. | |
void | update (U64 deltaTimeUS) |
Update the internal time interval between frames (microseconds) | |
void | setRepeatDelay (const D64 repeatDelay) noexcept |
Adjust delay between key injections. | |
void | setInitialDelay (const D64 initialDelay) noexcept |
Adjust the initial delay before we start injecting key repeats. | |
Protected Member Functions | |
virtual void | repeatKey (const Input::KeyEvent &evt)=0 |
Override this to define custom events for key repeats. | |
Private Attributes | |
KeyEvent | _key |
D64 | _elapsed |
D64 | _delay |
D64 | _repeatDelay |
Time intervals between key injections. | |
D64 | _initialDelay |
A class that repeatedly calls "repeatKey" between "begin" and "end" calls at specified intervals
Definition at line 44 of file AutoKeyRepeat.h.
|
virtualdefault |
|
noexcept |
Default constructor.
Definition at line 8 of file AutoKeyRepeat.cpp.
|
noexcept |
Called when a key is pressed.
Definition at line 17 of file AutoKeyRepeat.cpp.
|
noexcept |
Called when a key is released.
Definition at line 23 of file AutoKeyRepeat.cpp.
|
protectedpure virtual |
Override this to define custom events for key repeats.
Implemented in Divide::CEGUIInput.
|
inlinenoexcept |
Adjust the initial delay before we start injecting key repeats.
Definition at line 73 of file AutoKeyRepeat.h.
|
inlinenoexcept |
Adjust delay between key injections.
Definition at line 71 of file AutoKeyRepeat.h.
void Divide::Input::AutoRepeatKey::update | ( | U64 | deltaTimeUS | ) |
Update the internal time interval between frames (microseconds)
Definition at line 29 of file AutoKeyRepeat.cpp.
|
private |
Definition at line 49 of file AutoKeyRepeat.h.
|
private |
Definition at line 48 of file AutoKeyRepeat.h.
|
private |
The time after begin() and before repeatKey() is called. If end() is called in that interval, the key will not repeat
Definition at line 54 of file AutoKeyRepeat.h.
|
private |
Definition at line 46 of file AutoKeyRepeat.h.
|
private |
Time intervals between key injections.
Definition at line 51 of file AutoKeyRepeat.h.