OpenXcom  1.0
Open-source clone of the original X-Com
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
BasescapeState.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_BASESCAPESTATE_H
20 #define OPENXCOM_BASESCAPESTATE_H
21 
22 #include "../Engine/State.h"
23 
24 namespace OpenXcom
25 {
26 
27 class BaseView;
28 class MiniBaseView;
29 class Text;
30 class TextButton;
31 class TextEdit;
32 class Base;
33 class Globe;
34 
39 class BasescapeState : public State
40 {
41 private:
42  BaseView *_view;
43  MiniBaseView *_mini;
44  Text *_txtFacility, *_txtLocation, *_txtFunds;
45  TextEdit *_edtBase;
46  TextButton *_btnNewBase, *_btnBaseInfo, *_btnSoldiers, *_btnCrafts, *_btnFacilities, *_btnResearch, *_btnManufacture, *_btnTransfer, *_btnPurchase, *_btnSell, *_btnGeoscape;
47  Base *_base;
48  Globe *_globe;
49 public:
51  BasescapeState(Game *game, Base *base, Globe *globe);
55  void init();
57  void setBase(Base *base);
59  void btnNewBaseClick(Action *action);
61  void btnBaseInfoClick(Action *action);
63  void btnSoldiersClick(Action *action);
65  void btnCraftsClick(Action *action);
67  void btnFacilitiesClick(Action *action);
69  void btnResearchClick(Action *action);
71  void btnManufactureClick(Action *action);
73  void btnPurchaseClick(Action *action);
75  void btnSellClick(Action *action);
77  void btnTransferClick(Action *action);
79  void btnGeoscapeClick(Action *action);
81  void viewLeftClick(Action *action);
83  void viewRightClick(Action *action);
85  void viewMouseOver(Action *action);
87  void viewMouseOut(Action *action);
89  void miniClick(Action *action);
91  void edtBaseChange(Action *action);
93  void handleKeyPress(Action *action);
94 };
95 
96 }
97 
98 #endif
void handleKeyPress(Action *action)
Handler for pressing a base selection hotkey.
Definition: BasescapeState.cpp:500
Container for all the information associated with a given user action, like mouse clicks...
Definition: Action.h:34
A game state that receives user input and reacts accordingly.
Definition: State.h:44
void viewMouseOut(Action *action)
Handler for hovering out of the base view.
Definition: BasescapeState.cpp:477
BasescapeState(Game *game, Base *base, Globe *globe)
Creates the Basescape state.
Definition: BasescapeState.cpp:64
void viewRightClick(Action *action)
Handler for right clicking the base view.
Definition: BasescapeState.cpp:394
void setBase(Base *base)
Sets a new base to display.
Definition: BasescapeState.cpp:229
void btnNewBaseClick(Action *action)
Handler for clicking the Build New Base button.
Definition: BasescapeState.cpp:267
Interactive globe view of the world.
Definition: Globe.h:44
Text string displayed on screen.
Definition: Text.h:41
void btnResearchClick(Action *action)
Handler for clicking the Research button.
Definition: BasescapeState.cpp:314
~BasescapeState()
Cleans up the Basescape state.
Definition: BasescapeState.cpp:179
void viewMouseOver(Action *action)
Handler for hovering the base view.
Definition: BasescapeState.cpp:451
void btnSellClick(Action *action)
Handler for clicking the Sell/Sack button.
Definition: BasescapeState.cpp:341
void btnGeoscapeClick(Action *action)
Handler for clicking the Geoscape button.
Definition: BasescapeState.cpp:359
void btnBaseInfoClick(Action *action)
Handler for clicking the Base Information button.
Definition: BasescapeState.cpp:278
void edtBaseChange(Action *action)
Handler for changing the text on the Name edit.
Definition: BasescapeState.cpp:529
void btnFacilitiesClick(Action *action)
Handler for clicking the Build Facilities button.
Definition: BasescapeState.cpp:305
void btnManufactureClick(Action *action)
Handler for clicking the Manufacture button.
Definition: BasescapeState.cpp:323
void viewLeftClick(Action *action)
Handler for clicking the base view.
Definition: BasescapeState.cpp:368
Represents a player base on the globe.
Definition: Base.h:47
Coloured button with a text label.
Definition: TextButton.h:40
void btnCraftsClick(Action *action)
Handler for clicking the Equip Craft button.
Definition: BasescapeState.cpp:296
void miniClick(Action *action)
Handler for clicking the mini base view.
Definition: BasescapeState.cpp:486
Interactive view of a base.
Definition: BaseView.h:40
Mini view of a base.
Definition: MiniBaseView.h:36
The core of the game engine, manages the game's entire contents and structure.
Definition: Game.h:44
Editable version of Text.
Definition: TextEdit.h:35
void btnSoldiersClick(Action *action)
Handler for clicking the Soldiers button.
Definition: BasescapeState.cpp:287
void btnPurchaseClick(Action *action)
Handler for clicking the Purchase/Hire button.
Definition: BasescapeState.cpp:332
Basescape screen that shows a base's layout and lets the player manage their bases.
Definition: BasescapeState.h:39
void btnTransferClick(Action *action)
Handler for clicking the Transfer button.
Definition: BasescapeState.cpp:350
void init()
Updates the base stats.
Definition: BasescapeState.cpp:201