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

A gamepad axis control. More...

#include <gf/Controls.h>

Inheritance diagram for gf::GamepadAxisControl:
Inheritance graph

Public Member Functions

 GamepadAxisControl (GamepadId id, GamepadAxis axis, GamepadAxisDirection dir)
 Construct a gamepad axis control. More...
virtual void processEvent (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 gamepad axis control.

Constructor & Destructor Documentation

◆ GamepadAxisControl()

gf::GamepadAxisControl::GamepadAxisControl ( GamepadId  id,
GamepadAxis  axis,
GamepadAxisDirection  dir 

Construct a gamepad axis control.

idThe id of the gamepad
axisThe axis of the gamepad
dirThe direction of the axis
See also
gf::Gamepad::open, gf::GamepadAxisDirection

Member Function Documentation

◆ processEvent()

virtual void gf::GamepadAxisControl::processEvent ( const Event event)

Update the state of the control thanks to an event.

eventThe event to update the control.
See also

Implements gf::Control.