17 #ifndef HEADER_SUPERTUX_CONTROL_CONTROLLER_HPP 18 #define HEADER_SUPERTUX_CONTROL_CONTROLLER_HPP 21 #include <boost/optional.hpp> 51 std::ostream& operator<<(std::ostream& os, Control control);
53 std::string Control_to_string(Control control);
54 boost::optional<Control> Control_from_string(
const std::string& text);
62 virtual void update();
64 void set_control(Control control,
bool value);
67 bool hold(Control control)
const;
70 bool pressed(Control control)
const;
73 bool released(Control control)
const;
79 bool m_controls[
static_cast<int>(Control::CONTROLCOUNT)];
82 bool m_old_controls[
static_cast<int>(Control::CONTROLCOUNT)];
Definition: controller.hpp:56