Gamedev Framework (gf)  0.2.0
A C++11 framework for 2D games
Public Member Functions | List of all members
gf::KeycodeKeyControl Class Reference

A key control based on keycode. More...

#include <gf/Controls.h>

Inheritance diagram for gf::KeycodeKeyControl:
Inheritance graph

Public Member Functions

 KeycodeKeyControl (Keycode code)
 Construct a key control. More...
virtual void update (const Event &event) override
 Update the state of the control thanks to an event. More...
- Public Member Functions inherited from gf::Control
 Control ()
 Construct a control. More...
virtual ~Control ()
 Destroy the control. More...
bool isActive ()
 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...

Detailed Description

A key control based on keycode.

Constructor & Destructor Documentation

gf::KeycodeKeyControl::KeycodeKeyControl ( Keycode  code)

Construct a key control.

codeThe keycode of the key

Member Function Documentation

virtual void gf::KeycodeKeyControl::update ( const Event event)

Update the state of the control thanks to an event.

eventThe event to update the control.
See also

Implements gf::Control.