OpenXcom  1.0
Open-source clone of the original X-Com
ListLoadOriginalState.h
1 #pragma once
2 /*
3  * Copyright 2010-2016 OpenXcom Developers.
4  *
5  * This file is part of OpenXcom.
6  *
7  * OpenXcom is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version.
11  *
12  * OpenXcom is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with OpenXcom. If not, see <http://www.gnu.org/licenses/>.
19  */
20 #include "../Engine/State.h"
21 #include "../Savegame/SaveConverter.h"
22 #include "OptionsBaseState.h"
23 
24 namespace OpenXcom
25 {
26 
27 class TextButton;
28 class Window;
29 class Text;
30 
36 {
37 private:
38  TextButton *_btnNew, *_btnCancel;
39  Window *_window;
40  Text *_txtTitle, *_txtName, *_txtTime, *_txtDate;
41  TextButton *_btnSlot[SaveConverter::NUM_SAVES];
42  Text *_txtSlotName[SaveConverter::NUM_SAVES];
43  Text *_txtSlotTime[SaveConverter::NUM_SAVES];
44  Text *_txtSlotDate[SaveConverter::NUM_SAVES];
45  SaveOriginal _saves[SaveConverter::NUM_SAVES];
46  OptionsOrigin _origin;
47 public:
49  ListLoadOriginalState(OptionsOrigin origin);
53  void init();
55  void btnSlotClick(Action *action);
57  void btnNewClick(Action *action);
59  void btnCancelClick(Action *action);
60 };
61 
62 }
Container for all the information associated with a given user action, like mouse clicks...
Definition: Action.h:32
A game state that receives user input and reacts accordingly.
Definition: State.h:44
Box with a coloured border and custom background.
Definition: Window.h:40
Text string displayed on screen.
Definition: Text.h:40
void btnNewClick(Action *action)
Handler for clicking the OpenXcom button.
Definition: ListLoadOriginalState.cpp:149
Container for savegame info displayed on listings.
Definition: SaveConverter.h:31
ListLoadOriginalState(OptionsOrigin origin)
Creates the Saved Game state.
Definition: ListLoadOriginalState.cpp:46
Base class for saved game screens which provides the common layout and listing.
Definition: ListLoadOriginalState.h:35
void btnCancelClick(Action *action)
Handler for clicking the Cancel button.
Definition: ListLoadOriginalState.cpp:158
Coloured button with a text label.
Definition: TextButton.h:38
void btnSlotClick(Action *action)
Handler for clicking a Save Slot button.
Definition: ListLoadOriginalState.cpp:169
void init()
Sets up the saves list.
Definition: ListLoadOriginalState.cpp:135
~ListLoadOriginalState()
Cleans up the Saved Game state.
Definition: ListLoadOriginalState.cpp:127
Definition: BaseInfoState.cpp:40