SuperTuxKart
Loading...
Searching...
No Matches
keyboard_device.hpp
1// SuperTuxKart - a fun racing game with go-kart
2//
3// Copyright (C) 2009-2015 Marianne Gagnon
4// (C) 2014-2015 Joerg Henrichs
5//
6// This program is free software; you can redistribute it and/or
7// modify it under the terms of the GNU General Public License
8// as published by the Free Software Foundation; either version 3
9// of the License, or (at your option) any later version.
10//
11// This program is distributed in the hope that it will be useful,
12// but WITHOUT ANY WARRANTY; without even the implied warranty of
13// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14// GNU General Public License for more details.
15//
16// You should have received a copy of the GNU General Public License
17// along with this program; if not, write to the Free Software
18// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19
20#ifndef HEADER_KEYBOARD_DEVICE_HPP
21#define HEADER_KEYBOARD_DEVICE_HPP
22
23#include "input/input_device.hpp"
24
25#include "utils/cpp2011.hpp"
26
27class KeyboardConfig;
28
34{
35public:
37 KeyboardDevice(KeyboardConfig *configuration);
38
39 virtual ~KeyboardDevice() {}
40 virtual bool processAndMapInput(Input::InputType type, const int id,
41 InputManager::InputDriverMode mode,
42 PlayerAction *action, int* value = NULL
43 ) OVERRIDE;
44
45}; // KeyboardDevice
46
47#endif
base class for input devices
Definition: input_device.hpp:48
specialisation of DeviceConfig for keyboard type devices
Definition: keyboard_config.hpp:35
specialisation of InputDevice for keyboard type devices
Definition: keyboard_device.hpp:34
virtual bool processAndMapInput(Input::InputType type, const int id, InputManager::InputDriverMode mode, PlayerAction *action, int *value=NULL) OVERRIDE
Invoked when this device it used.
Definition: keyboard_device.cpp:56
PlayerAction
types of input events / what actions the players can do
Definition: input.hpp:117