OpenXcom  1.0
Open-source clone of the original X-Com
BasescapeState.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 BaseView;
26 class MiniBaseView;
27 class Text;
28 class TextButton;
29 class TextEdit;
30 class Base;
31 class Globe;
32 
37 class BasescapeState : public State
38 {
39 private:
40  BaseView *_view;
41  MiniBaseView *_mini;
42  Text *_txtFacility, *_txtLocation, *_txtFunds;
43  TextEdit *_edtBase;
44  TextButton *_btnNewBase, *_btnBaseInfo, *_btnSoldiers, *_btnCrafts, *_btnFacilities, *_btnResearch, *_btnManufacture, *_btnTransfer, *_btnPurchase, *_btnSell, *_btnGeoscape;
45  Base *_base;
46  Globe *_globe;
47 public:
49  BasescapeState(Base *base, Globe *globe);
53  void init();
55  void setBase(Base *base);
57  void btnNewBaseClick(Action *action);
59  void btnBaseInfoClick(Action *action);
61  void btnSoldiersClick(Action *action);
63  void btnCraftsClick(Action *action);
65  void btnFacilitiesClick(Action *action);
67  void btnResearchClick(Action *action);
69  void btnManufactureClick(Action *action);
71  void btnPurchaseClick(Action *action);
73  void btnSellClick(Action *action);
75  void btnTransferClick(Action *action);
77  void btnGeoscapeClick(Action *action);
79  void viewLeftClick(Action *action);
81  void viewRightClick(Action *action);
83  void viewMouseOver(Action *action);
85  void viewMouseOut(Action *action);
87  void miniClick(Action *action);
89  void edtBaseChange(Action *action);
91  void handleKeyPress(Action *action);
92 };
93 
94 }
void handleKeyPress(Action *action)
Handler for pressing a base selection hotkey.
Definition: BasescapeState.cpp:481
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 viewMouseOut(Action *action)
Handler for hovering out of the base view.
Definition: BasescapeState.cpp:458
void viewRightClick(Action *action)
Handler for right clicking the base view.
Definition: BasescapeState.cpp:375
void setBase(Base *base)
Sets a new base to display.
Definition: BasescapeState.cpp:210
void btnNewBaseClick(Action *action)
Handler for clicking the Build New Base button.
Definition: BasescapeState.cpp:248
Interactive globe view of the world.
Definition: Globe.h:43
Text string displayed on screen.
Definition: Text.h:40
void btnResearchClick(Action *action)
Handler for clicking the Research button.
Definition: BasescapeState.cpp:295
~BasescapeState()
Cleans up the Basescape state.
Definition: BasescapeState.cpp:160
BasescapeState(Base *base, Globe *globe)
Creates the Basescape state.
Definition: BasescapeState.cpp:63
void viewMouseOver(Action *action)
Handler for hovering the base view.
Definition: BasescapeState.cpp:432
void btnSellClick(Action *action)
Handler for clicking the Sell/Sack button.
Definition: BasescapeState.cpp:322
void btnGeoscapeClick(Action *action)
Handler for clicking the Geoscape button.
Definition: BasescapeState.cpp:340
void btnBaseInfoClick(Action *action)
Handler for clicking the Base Information button.
Definition: BasescapeState.cpp:259
void edtBaseChange(Action *action)
Handler for changing the text on the Name edit.
Definition: BasescapeState.cpp:510
void btnFacilitiesClick(Action *action)
Handler for clicking the Build Facilities button.
Definition: BasescapeState.cpp:286
void btnManufactureClick(Action *action)
Handler for clicking the Manufacture button.
Definition: BasescapeState.cpp:304
void viewLeftClick(Action *action)
Handler for clicking the base view.
Definition: BasescapeState.cpp:349
Represents a player base on the globe.
Definition: Base.h:45
Coloured button with a text label.
Definition: TextButton.h:38
void btnCraftsClick(Action *action)
Handler for clicking the Equip Craft button.
Definition: BasescapeState.cpp:277
void miniClick(Action *action)
Handler for clicking the mini base view.
Definition: BasescapeState.cpp:467
Interactive view of a base.
Definition: BaseView.h:38
Mini view of a base.
Definition: MiniBaseView.h:34
Editable version of Text.
Definition: TextEdit.h:35
void btnSoldiersClick(Action *action)
Handler for clicking the Soldiers button.
Definition: BasescapeState.cpp:268
void btnPurchaseClick(Action *action)
Handler for clicking the Purchase/Hire button.
Definition: BasescapeState.cpp:313
Basescape screen that shows a base&#39;s layout and lets the player manage their bases.
Definition: BasescapeState.h:37
void btnTransferClick(Action *action)
Handler for clicking the Transfer button.
Definition: BasescapeState.cpp:331
Definition: BaseInfoState.cpp:40
void init()
Updates the base stats.
Definition: BasescapeState.cpp:182