OpenXcom  1.0
Open-source clone of the original X-Com
ManufactureInfoState.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 Base;
26 class Window;
27 class Text;
28 class ArrowButton;
29 class TextButton;
30 class ToggleTextButton;
31 class RuleManufacture;
32 class Production;
33 class Timer;
34 class InteractiveSurface;
35 
40 {
41 private:
42  Base * _base;
43  RuleManufacture * _item;
44  Production * _production;
45  Window * _window;
46  ArrowButton * _btnUnitUp, * _btnUnitDown, * _btnEngineerUp, * _btnEngineerDown;
47  TextButton * _btnStop, * _btnOk;
48  Text * _txtTitle, * _txtAvailableEngineer, * _txtAvailableSpace, * _txtMonthlyProfit, * _txtAllocatedEngineer, * _txtUnitToProduce, * _txtUnitUp, * _txtUnitDown, * _txtEngineerUp, * _txtEngineerDown, * _txtAllocated, * _txtTodo;
49  ToggleTextButton *_btnSell;
50  Timer * _timerMoreEngineer, * _timerMoreUnit, * _timerLessEngineer, * _timerLessUnit;
51  InteractiveSurface *_surfaceEngineers, *_surfaceUnits;
52  int _producedItemsValue;
54  void initProfitInfo ();
56  int getMonthlyNetFunds () const;
58  void btnSellClick (Action * action);
60  void btnStopClick (Action * action);
62  void btnOkClick (Action * action);
64  void moreEngineer(int change);
66  void moreEngineerPress(Action * action);
68  void moreEngineerRelease(Action * action);
70  void moreEngineerClick(Action * action);
72  void moreUnit(int change);
74  void moreUnitPress(Action * action);
76  void moreUnitRelease(Action * action);
78  void moreUnitClick(Action * action);
80  void lessEngineer(int change);
82  void lessEngineerPress(Action * action);
84  void lessEngineerRelease(Action * action);
86  void lessEngineerClick(Action * action);
88  void lessUnit(int change);
90  void lessUnitPress(Action * action);
92  void lessUnitRelease(Action * action);
94  void lessUnitClick(Action * action);
96  void onMoreEngineer();
98  void onLessEngineer();
100  void handleWheelEngineer(Action *action);
102  void onMoreUnit();
104  void onLessUnit();
106  void handleWheelUnit(Action *action);
108  void setAssignedEngineer();
110  void think();
112  void buildUi();
114  void exitState();
115 public:
117  ManufactureInfoState(Base * base, RuleManufacture * _item);
119  ManufactureInfoState(Base * base, Production * production);
122 };
123 
124 }
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
Timer used to run code in fixed intervals.
Definition: Timer.h:35
Surface that the user can interact with.
Definition: InteractiveSurface.h:37
Definition: ToggleTextButton.h:27
Text string displayed on screen.
Definition: Text.h:40
Definition: Production.h:31
Represents a player base on the globe.
Definition: Base.h:45
Coloured button with a text label.
Definition: TextButton.h:38
Button with an arrow on it.
Definition: ArrowButton.h:35
Represents the information needed to manufacture an object.
Definition: RuleManufacture.h:30
~ManufactureInfoState()
Cleans up the state.
Definition: ManufactureInfoState.cpp:252
ManufactureInfoState(Base *base, RuleManufacture *_item)
Creates the State (new production).
Definition: ManufactureInfoState.cpp:51
Screen that allows changing of Production settings (assigned engineer, units to build).
Definition: ManufactureInfoState.h:39
Definition: BaseInfoState.cpp:40