SuperTuxKart
Loading...
Searching...
No Matches
options_screen_input.hpp
1// SuperTuxKart - a fun racing game with go-kart
2// Copyright (C) 2009-2015 Marianne Gagnon
3//
4// This program is free software; you can redistribute it and/or
5// modify it under the terms of the GNU General Public License
6// as published by the Free Software Foundation; either version 3
7// of the License, or (at your option) any later version.
8//
9// This program is distributed in the hope that it will be useful,
10// but WITHOUT ANY WARRANTY; without even the implied warranty of
11// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12// GNU General Public License for more details.
13//
14// You should have received a copy of the GNU General Public License
15// along with this program; if not, write to the Free Software
16// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17
18
19#ifndef __HEADER_OPTIONS_SCREEN_INPUT_HPP__
20#define __HEADER_OPTIONS_SCREEN_INPUT_HPP__
21
22#include <string>
23#include "guiengine/screen.hpp"
24
25namespace GUIEngine { class Widget; }
26class DeviceConfig;
27namespace irr { namespace gui { class STKModifiedSpriteBank; } namespace video { class IVideoDriver; } }
28
29
30struct Input;
31
36class OptionsScreenInput : public GUIEngine::Screen, public GUIEngine::ScreenSingleton<OptionsScreenInput>
37{
38 size_t m_gamepad_count;
40
41 void updateInputButtons(DeviceConfig* config);
42 void buildDeviceList();
43
44 irr::gui::STKModifiedSpriteBank* m_icon_bank;
45
46 std::map<std::string, float> m_highlights;
47
48public:
50
52 virtual void loadedFromFile();
53
55 virtual void eventCallback(GUIEngine::Widget* widget, const std::string& name, const int playerID);
56
58 virtual void unloaded();
59
61 virtual void init();
62
67 void rebuildDeviceList();
68
70 virtual void filterInput(Input::InputType type,
71 int deviceID,
72 int btnID,
73 int axisDir,
74 int value);
75
77 virtual void onUpdate(float dt);
78};
79
80#endif
contains the key bindings information related to one input device
Definition: device_config.hpp:42
Declares a class to be a singleton.
Definition: screen.hpp:59
Represents a single GUI screen.
Definition: screen.hpp:97
The nearly-abstract base of all widgets (not fully abstract since a bare Widget can be created for th...
Definition: widget.hpp:143
Input options screen.
Definition: options_screen_input.hpp:37
virtual void eventCallback(GUIEngine::Widget *widget, const std::string &name, const int playerID)
implement callback from parent class GUIEngine::Screen
Definition: options_screen_input.cpp:242
virtual void init()
implement callback from parent class GUIEngine::Screen
Definition: options_screen_input.cpp:175
void rebuildDeviceList()
invoke if the list of devices changed after the creation of this screen.
Definition: options_screen_input.cpp:219
virtual void unloaded()
implement optional callback from parent class GUIEngine::Screen
Definition: options_screen_input.cpp:329
virtual void onUpdate(float dt)
implement callback from parent class GUIEngine::Screen
Definition: options_screen_input.cpp:372
virtual void loadedFromFile()
implement callback from parent class GUIEngine::Screen
Definition: options_screen_input.cpp:62
virtual void filterInput(Input::InputType type, int deviceID, int btnID, int axisDir, int value)
implement callback from parent class GUIEngine::Screen
Definition: options_screen_input.cpp:337
Contains all GUI engine related classes and functions.
Definition: abstract_state_manager.hpp:33
Definition: input.hpp:35