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);
void lstItemsMousePress(Action *action)
Handler for pressing-down a mouse-button in the list.
Definition: PurchaseState.cpp:398
Container for all the information associated with a given user action, like mouse clicks...
Definition: Action.h:34
void btnOkClick(Action *action)
Handler for clicking the OK button.
Definition: PurchaseState.cpp:252
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:42
Timer used to run code in fixed intervals.
Definition: Timer.h:37
void lstItemsRightArrowPress(Action *action)
Handler for pressing a Decrease arrow in the list.
Definition: PurchaseState.cpp:360
List of Text's split into columns.
Definition: TextList.h:42
Text string displayed on screen.
Definition: Text.h:41
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 lstItemsLeftArrowPress(Action *action)
Handler for pressing an Increase arrow in the list.
Definition: PurchaseState.cpp:322
void think()
Runs the timers.
Definition: PurchaseState.cpp:223
void decrease()
Decreases the quantity of an item by one.
Definition: PurchaseState.cpp:536
void lstItemsRightArrowRelease(Action *action)
Handler for releasing a Decrease arrow in the list.
Definition: PurchaseState.cpp:370
void increaseByValue(int change)
Increases the quantity of an item by the given value.
Definition: PurchaseState.cpp:470
void increase()
Increases the quantity of an item by one.
Definition: PurchaseState.cpp:459
PurchaseState(Game *game, Base *base)
Creates the Purchase state.
Definition: PurchaseState.cpp:57
void lstItemsLeftArrowRelease(Action *action)
Handler for releasing an Increase arrow in the list.
Definition: PurchaseState.cpp:332
Represents a player base on the globe.
Definition: Base.h:47
~PurchaseState()
Cleans up the Purchase state.
Definition: PurchaseState.cpp:214
Coloured button with a text label.
Definition: TextButton.h:40
void lstItemsRightArrowClick(Action *action)
Handler for clicking a Decrease arrow in the list.
Definition: PurchaseState.cpp:383
The core of the game engine, manages the game's entire contents and structure.
Definition: Game.h:44
void btnCancelClick(Action *action)
Handler for clicking the Cancel button.
Definition: PurchaseState.cpp:313
Purchase/Hire screen that lets the player buy new items for a base.
Definition: PurchaseState.h:40
void lstItemsLeftArrowClick(Action *action)
Handler for clicking an Increase arrow in the list.
Definition: PurchaseState.cpp:345