OpenXcom  1.0
Open-source clone of the original X-Com
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
ListSaveState.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_LISTSAVESTATE_H
20 #define OPENXCOM_LISTSAVESTATE_H
21 
22 #include <string>
23 #include "ListGamesState.h"
24 
25 namespace OpenXcom
26 {
27 
28 class TextEdit;
29 class TextButton;
30 
36 {
37 private:
38  TextEdit *_edtSave;
39  TextButton *_btnSaveGame;
40  std::wstring _selected;
41  int _previousSelectedRow, _selectedRow;
42 public:
44  ListSaveState(Game *game, OptionsOrigin origin);
48  void updateList();
50  void edtSaveKeyPress(Action *action);
52  void btnSaveGameClick(Action *action);
54  void lstSavesPress(Action *action);
56  void saveGame();
57 };
58 
59 }
60 
61 #endif
Container for all the information associated with a given user action, like mouse clicks...
Definition: Action.h:34
void btnSaveGameClick(Action *action)
Handler for clicking on the Save Game button.
Definition: ListSaveState.cpp:152
void lstSavesPress(Action *action)
Handler for clicking the Saves list.
Definition: ListSaveState.cpp:96
ListSaveState(Game *game, OptionsOrigin origin)
Creates the Save Game state.
Definition: ListSaveState.cpp:39
Coloured button with a text label.
Definition: TextButton.h:40
void saveGame()
Save game.
Definition: ListSaveState.cpp:163
Save Game screen for listing info on available saved games and saving them.
Definition: ListSaveState.h:35
Base class for saved game screens which provides the common layout and listing.
Definition: ListGamesState.h:42
void edtSaveKeyPress(Action *action)
Handler for pressing a key on the Save edit.
Definition: ListSaveState.cpp:139
~ListSaveState()
Cleans up the Save Game state.
Definition: ListSaveState.cpp:75
The core of the game engine, manages the game's entire contents and structure.
Definition: Game.h:44
void updateList()
Updates the savegame list.
Definition: ListSaveState.cpp:84
Editable version of Text.
Definition: TextEdit.h:35