![]() |
Conquer Chess
Chess and Starcraft combined
|
A physical controller. More...
#include <physical_controller.h>
Public Member Functions | |
| physical_controller (const physical_controller_type type=physical_controller_type::keyboard, const key_bindings &kbs=create_left_keyboard_key_bindings(), const mouse_bindings &mbs=mouse_bindings()) | |
| const key_bindings & | get_key_bindings () const |
| Get the key bindings, if this is a keyboard. | |
| const mouse_bindings & | get_mouse_bindings () const |
| Get the mouse bindings, if this is a mouse. | |
| const physical_controller_type & | get_type () const noexcept |
| user_inputs | process_input (const sf::Event &event, const side player_side, const game_view_layout &layout) const |
| Process the input for this controller. | |
| void | set_type (const physical_controller_type t) noexcept |
A physical controller.
A physical controller is a class that takes input from a mouse or keyboard and converts these into the right 'user_input'. sf::Event -> controllers -> user_input
|
explicit |
| const key_bindings & physical_controller::get_key_bindings | ( | ) | const |
Get the key bindings, if this is a keyboard.
| const mouse_bindings & physical_controller::get_mouse_bindings | ( | ) | const |
Get the mouse bindings, if this is a mouse.
|
inlinenoexcept |
| user_inputs physical_controller::process_input | ( | const sf::Event & | event, |
| const side | player_side, | ||
| const game_view_layout & | layout | ||
| ) | const |
Process the input for this controller.
Returns an an empty vector if this controller is uneffected by the event
|
inlinenoexcept |