OpenXcom  1.0
Open-source clone of the original X-Com
GeoscapeCraftState.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 
22 namespace OpenXcom
23 {
24 
25 class TextButton;
26 class Window;
27 class Text;
28 class Craft;
29 class Globe;
30 class Waypoint;
31 
36 class GeoscapeCraftState : public State
37 {
38 private:
39  Craft *_craft;
40  Globe *_globe;
41  Waypoint *_waypoint;
42 
43  TextButton *_btnBase, *_btnTarget, *_btnPatrol, *_btnCancel;
44  Window *_window;
45  Text *_txtTitle, *_txtStatus, *_txtBase, *_txtSpeed, *_txtMaxSpeed, *_txtAltitude, *_txtFuel, *_txtDamage, *_txtW1Name, *_txtW1Ammo, *_txtW2Name, *_txtW2Ammo, *_txtRedirect, *_txtSoldier, *_txtHWP;
46 public:
48  GeoscapeCraftState(Craft *craft, Globe *globe, Waypoint *waypoint);
52  void btnBaseClick(Action *action);
54  void btnTargetClick(Action *action);
56  void btnPatrolClick(Action *action);
58  void btnCancelClick(Action *action);
59 };
60 
61 }
Represents a craft stored in a base.
Definition: Craft.h:45
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 btnCancelClick(Action *action)
Handler for clicking the Cancel button.
Definition: GeoscapeCraftState.cpp:298
Box with a coloured border and custom background.
Definition: Window.h:40
Interactive globe view of the world.
Definition: Globe.h:43
Text string displayed on screen.
Definition: Text.h:40
void btnTargetClick(Action *action)
Handler for clicking the Select New Target button.
Definition: GeoscapeCraftState.cpp:276
Craft window that displays info about a specific craft out on the Geoscape.
Definition: GeoscapeCraftState.h:36
~GeoscapeCraftState()
Cleans up the Geoscape Craft state.
Definition: GeoscapeCraftState.cpp:256
GeoscapeCraftState(Craft *craft, Globe *globe, Waypoint *waypoint)
Creates the Geoscape Craft state.
Definition: GeoscapeCraftState.cpp:51
Coloured button with a text label.
Definition: TextButton.h:38
void btnPatrolClick(Action *action)
Handler for clicking the Patrol button.
Definition: GeoscapeCraftState.cpp:287
Represents a fixed waypoint on the world.
Definition: Waypoint.h:30
Definition: BaseInfoState.cpp:40
void btnBaseClick(Action *action)
Handler for clicking the Return To Base button.
Definition: GeoscapeCraftState.cpp:265