17 #ifndef HEADER_SUPERTUX_CONTROL_INPUT_MANAGER_HPP 18 #define HEADER_SUPERTUX_CONTROL_INPUT_MANAGER_HPP 20 #include "control/controller.hpp" 27 #include <unordered_map> 29 #include "util/currenton.hpp" 50 void process_event(
const SDL_Event& event);
55 void use_game_controller(
bool v);
56 bool use_game_controller()
const {
return m_use_game_controller; }
58 const Controller& get_controller(
int player_id = 0)
const;
61 int get_num_users()
const {
return static_cast<int>(m_controllers.size()); }
66 void on_player_removed(
int player_id);
68 bool has_corresponsing_controller(
int player_id)
const;
71 std::vector<std::unique_ptr<Controller>> m_controllers;
74 bool& m_use_game_controller;
75 std::unique_ptr<KeyboardManager> keyboard_manager;
76 std::unique_ptr<JoystickManager> joystick_manager;
77 std::unique_ptr<GameControllerManager> game_controller_manager;
Definition: controller.hpp:57
Manages Joysticks.
Definition: joystick_manager.hpp:36
Definition: joystick_config.hpp:28
Definition: keyboard_config.hpp:29
A 'Currenton' allows access to the currently active instance of a class via the static current() func...
Definition: currenton.hpp:30
Definition: keyboard_manager.hpp:30
Manages GameControllers.
Definition: game_controller_manager.hpp:37