![]() |
Gamedev Framework (gf) 1.2.0
A C++17 framework for 2D games
|
A key control based on keycode. More...
#include <gf/Controls.h>
Public Member Functions | |
KeycodeKeyControl (Keycode code) | |
Construct a key control. More... | |
virtual void | processEvent (const Event &event) override |
Update the state of the control thanks to an event. More... | |
![]() | |
Control () | |
Construct a control. More... | |
virtual | ~Control () |
Destroy the control. More... | |
bool | isActive () const |
Check if the control is active. More... | |
void | setActive (bool active=true) |
Change the active state of the control. More... | |
void | reset () |
Desactivate the control. More... | |
virtual void | processEvent (const Event &event)=0 |
Update the state of the control thanks to an event. More... | |
A key control based on keycode.
|
explicit |
Construct a key control.
code | The keycode of the key |
|
overridevirtual |
Update the state of the control thanks to an event.
event | The event to update the control. |
Implements gf::Control.