A physical control.
More...
#include <ui/Control.h>
|
| | Control (std::string name, std::string controller_name) |
| | Construct a control with a name and its controller name. More...
|
| |
| virtual | ~Control () |
| | Destroy the control. More...
|
| |
| bool | isActive () |
| | Tell whether 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 | update (const sf::Event &event)=0 |
| | Update the state of the control thanks to an event. More...
|
| |
| ui::Control::Control |
( |
std::string |
name, |
|
|
std::string |
controller_name |
|
) |
| |
|
inline |
Construct a control with a name and its controller name.
- Parameters
-
| name | the name of the control. |
| controller_name | the name of the controller |
| virtual ui::Control::~Control |
( |
| ) |
|
|
virtual |
| bool ui::Control::isActive |
( |
| ) |
|
|
inline |
Tell whether the control is active.
- Returns
- true if the control is active.
- See also
- Action::isActive()
| void ui::Control::reset |
( |
| ) |
|
|
inline |
Desactivate the control.
This call is equivalent to:
- See also
- Action::reset()
| void ui::Control::setActive |
( |
bool |
active = true | ) |
|
|
inline |
Change the active state of the control.
- Parameters
-
| active | the new state of the control. |
| virtual void ui::Control::update |
( |
const sf::Event & |
event | ) |
|
|
pure virtual |