Home | All Classes | Grouped Classes | Index | Search

Class CL_InputButton

Input Button interface. More...

Derived from: none
Derived by: none
Group: Display (Input)

#include <ClanLib/display.h>

Construction:

CL_InputButton

Constructor.

Attributes:

peek_pressed

Returns the number of presses this inputbutton has been pressed.

peek_key

Returns the CL_InputEvent of the last input press.

Operations:

operator =

Copy assignment operator.

bind

Binds a key.

unbind

Unbinds a key.

unbind_all

Unbinds all keys.

get_bindings

Returns a list over all keys bound to this inputbutton.

pop_pressed

Returns the number of presses this inputbutton has been pressed. This clears the state of this inputbutton.

pop_key

Returns the CL_InputEvent of the last input press. This clears the state of the inputbutton.

clear

Clears the state of the inputbutton.

Detailed description:

!group=Display/Input! !header=display.h! Use this class to bind inputevents to this class. You can then check if any input events has be activated (like a mouse-press, a certain keypress etc). Useful for things like mapping SPACE and LEFT MOUSE to a Fire Action.


Questions or comments, write to the
ClanLib mailing list.