![]() |
Gamedev Framework (gf)
0.19.0
A C++17 framework for 2D games
|
A gf::Control is a object that can react to an event. A control can be active or not. For example, a control for a key is active when the key is pressed and inactive when the key is released.
gf provides some predefined simple controls:
You can define your own controls. For example, you could define a control for a combo or a control for Konami Code.
A gf::Action is an abstract description of a user action. An action can be associated with several controls, an action becomes active when one of the controls is active. Then an action can be instantaneous ou continuous. An instantaneous action is active only once and then becomes inactive. A continuous action is active as long as one of the control is active.
A gf::ActionContainer allows to group actions and easily broadcast the events to all controls of all actions.