OpenXcom
1.0
Open-source clone of the original X-Com
src
Menu
OptionsControlsState.h
1
/*
2
* Copyright 2010-2014 OpenXcom Developers.
3
*
4
* This file is part of OpenXcom.
5
*
6
* OpenXcom is free software: you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License as published by
8
* the Free Software Foundation, either version 3 of the License, or
9
* (at your option) any later version.
10
*
11
* OpenXcom 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 OpenXcom. If not, see <http://www.gnu.org/licenses/>.
18
*/
19
#ifndef OPENXCOM_OPTIONSCONTROLSSTATE_H
20
#define OPENXCOM_OPTIONSCONTROLSSTATE_H
21
22
#include <string>
23
#include <vector>
24
#include "../Engine/OptionInfo.h"
25
#include "OptionsBaseState.h"
26
27
namespace
OpenXcom
28
{
29
30
class
TextList;
31
36
class
OptionsControlsState
:
public
OptionsBaseState
37
{
38
private
:
39
TextList
*_lstControls;
40
std::vector<OptionInfo> _controlsGeneral, _controlsGeo, _controlsBattle;
41
int
_selected;
42
OptionInfo
*_selKey;
43
Uint8 _colorGroup, _colorSel, _colorNormal;
44
45
void
addControls(
const
std::vector<OptionInfo> &keys);
46
OptionInfo
*getControl(
size_t
sel);
47
std::string ucWords(std::string str);
48
public
:
50
OptionsControlsState
(
Game
*game, OptionsOrigin origin);
52
~OptionsControlsState
();
54
void
init
();
56
void
lstControlsClick
(
Action
*action);
58
void
lstControlsKeyPress
(
Action
*action);
59
};
60
61
}
62
63
#endif
OpenXcom
COPYING:
Definition:
BaseInfoState.cpp:41
OpenXcom::OptionsControlsState
Controls screen which allows the user to customize the various key shortcuts in the game.
Definition:
OptionsControlsState.h:37
OpenXcom::OptionsControlsState::~OptionsControlsState
~OptionsControlsState()
Cleans up the Controls state.
Definition:
OptionsControlsState.cpp:103
OpenXcom::OptionsControlsState::lstControlsKeyPress
void lstControlsKeyPress(Action *action)
Handler for pressing a key in the Controls list.
Definition:
OptionsControlsState.cpp:239
OpenXcom::TextList
List of Text's split into columns.
Definition:
TextList.h:43
OpenXcom::Action
Container for all the information associated with a given user action, like mouse clicks,...
Definition:
Action.h:35
OpenXcom::OptionsBaseState
Options base state for common stuff across Options windows.
Definition:
OptionsBaseState.h:44
OpenXcom::OptionsControlsState::OptionsControlsState
OptionsControlsState(Game *game, OptionsOrigin origin)
Creates the Controls state.
Definition:
OptionsControlsState.cpp:41
OpenXcom::OptionsControlsState::init
void init()
Fills controls list.
Definition:
OptionsControlsState.cpp:110
OpenXcom::OptionsControlsState::lstControlsClick
void lstControlsClick(Action *action)
Handler for clicking the Controls list.
Definition:
OptionsControlsState.cpp:197
OpenXcom::Game
The core of the game engine, manages the game's entire contents and structure.
Definition:
Game.h:45
OpenXcom::OptionInfo
Helper class that ties metadata to particular options to help in serializing and stuff.
Definition:
OptionInfo.h:39
Generated by
1.8.18