19 #ifndef OPENXCOM_PURCHASESTATE_H
20 #define OPENXCOM_PURCHASESTATE_H
22 #include "../Engine/State.h"
47 Text *_txtTitle, *_txtFunds, *_txtPurchases, *_txtItem, *_txtCost, *_txtQuantity, *_txtSpaceUsed;
49 std::vector<std::string> _crafts, _items;
50 std::vector<int> _qtys;
51 size_t _sel, _itemOffset;
52 int _total, _pQty, _cQty;
54 Timer *_timerInc, *_timerDec;
58 bool isExcluded(std::string item);
Container for all the information associated with a given user action, like mouse clicks,...
Definition: Action.h:35
Represents a player base on the globe.
Definition: Base.h:48
The core of the game engine, manages the game's entire contents and structure.
Definition: Game.h:45
Purchase/Hire screen that lets the player buy new items for a base.
Definition: PurchaseState.h:41
void lstItemsRightArrowRelease(Action *action)
Handler for releasing a Decrease arrow in the list.
Definition: PurchaseState.cpp:370
void btnOkClick(Action *action)
Handler for clicking the OK button.
Definition: PurchaseState.cpp:252
void decrease()
Decreases the quantity of an item by one.
Definition: PurchaseState.cpp:536
~PurchaseState()
Cleans up the Purchase state.
Definition: PurchaseState.cpp:214
void btnCancelClick(Action *action)
Handler for clicking the Cancel button.
Definition: PurchaseState.cpp:313
PurchaseState(Game *game, Base *base)
Creates the Purchase state.
Definition: PurchaseState.cpp:57
void lstItemsRightArrowPress(Action *action)
Handler for pressing a Decrease arrow in the list.
Definition: PurchaseState.cpp:360
void lstItemsLeftArrowPress(Action *action)
Handler for pressing an Increase arrow in the list.
Definition: PurchaseState.cpp:322
void lstItemsLeftArrowRelease(Action *action)
Handler for releasing an Increase arrow in the list.
Definition: PurchaseState.cpp:332
void updateItemStrings()
Updates the quantity-strings of the selected item.
Definition: PurchaseState.cpp:575
void decreaseByValue(int change)
Decreases the quantity of an item by the given value.
Definition: PurchaseState.cpp:547
void think()
Runs the timers.
Definition: PurchaseState.cpp:223
void lstItemsMousePress(Action *action)
Handler for pressing-down a mouse-button in the list.
Definition: PurchaseState.cpp:398
void lstItemsRightArrowClick(Action *action)
Handler for clicking a Decrease arrow in the list.
Definition: PurchaseState.cpp:383
void increase()
Increases the quantity of an item by one.
Definition: PurchaseState.cpp:459
void lstItemsLeftArrowClick(Action *action)
Handler for clicking an Increase arrow in the list.
Definition: PurchaseState.cpp:345
void increaseByValue(int change)
Increases the quantity of an item by the given value.
Definition: PurchaseState.cpp:470
A game state that receives user input and reacts accordingly.
Definition: State.h:45
Coloured button with a text label.
Definition: TextButton.h:41
Text string displayed on screen.
Definition: Text.h:42
List of Text's split into columns.
Definition: TextList.h:43
Timer used to run code in fixed intervals.
Definition: Timer.h:38
Box with a coloured border and custom background.
Definition: Window.h:43
COPYING:
Definition: BaseInfoState.cpp:41