OpenXcom  1.0
Open-source clone of the original X-Com
SoldierDiaryOverviewState.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 <vector>
22 
23 namespace OpenXcom
24 {
25 
26 class TextButton;
27 class Window;
28 class Text;
29 class TextList;
30 class Base;
31 class SoldierInfoState;
32 class Soldier;
33 
39 {
40 private:
41  Base *_base;
42  size_t _soldierId;
43  SoldierInfoState *_soldierInfoState;
44  Soldier *_soldier;
45  std::vector<Soldier*> *_list;
46 
47  TextButton *_btnOk, *_btnPrev, *_btnNext, *_btnKills, *_btnMissions, *_btnCommendations;
48  Window *_window;
49  Text *_txtTitle, *_txtMission, *_txtRating, *_txtDate;
50  TextList *_lstDiary;
51 
52 public:
54  SoldierDiaryOverviewState(Base *base, size_t soldierId, SoldierInfoState *soldierInfoState);
58  void init();
60  void setSoldierId(size_t soldierId);
62  void btnOkClick(Action *action);
64  void btnPrevClick(Action *action);
66  void btnNextClick(Action *action);
68  void btnKillsClick(Action *action);
70  void btnMissionsClick(Action *action);
72  void btnCommendationsClick(Action *action);
74  void lstDiaryInfoClick(Action *action);
75 };
76 
77 }
void init()
Updates the soldier info.
Definition: SoldierDiaryOverviewState.cpp:162
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
void setSoldierId(size_t soldierId)
Set the soldier&#39;s Id.
Definition: SoldierDiaryOverviewState.cpp:219
Box with a coloured border and custom background.
Definition: Window.h:40
List of Text&#39;s split into columns.
Definition: TextList.h:40
Text string displayed on screen.
Definition: Text.h:40
void btnPrevClick(Action *action)
Handler for clicking the Previous button.
Definition: SoldierDiaryOverviewState.cpp:266
void lstDiaryInfoClick(Action *action)
Handler for clicking on mission list.
Definition: SoldierDiaryOverviewState.cpp:291
~SoldierDiaryOverviewState()
Cleans up the Soldier Diary state.
Definition: SoldierDiaryOverviewState.cpp:153
SoldierDiaryOverviewState(Base *base, size_t soldierId, SoldierInfoState *soldierInfoState)
Creates the Soldier Diary state.
Definition: SoldierDiaryOverviewState.cpp:47
Diary screen that shows all the missions a soldier has.
Definition: SoldierDiaryOverviewState.h:38
void btnOkClick(Action *action)
Handler for clicking the OK button.
Definition: SoldierDiaryOverviewState.cpp:228
void btnCommendationsClick(Action *action)
Handler for clicking the Commendations button.
Definition: SoldierDiaryOverviewState.cpp:256
void btnMissionsClick(Action *action)
Handler for clicking the Missions button.
Definition: SoldierDiaryOverviewState.cpp:247
Represents a soldier hired by the player.
Definition: Soldier.h:48
Represents a player base on the globe.
Definition: Base.h:45
Coloured button with a text label.
Definition: TextButton.h:38
Soldier Info screen that shows all the info of a specific soldier.
Definition: SoldierInfoState.h:39
void btnNextClick(Action *action)
Handler for clicking the Next button.
Definition: SoldierDiaryOverviewState.cpp:279
void btnKillsClick(Action *action)
Handler for clicking the Kills button.
Definition: SoldierDiaryOverviewState.cpp:238
Definition: BaseInfoState.cpp:40