20 #include "../Engine/State.h" 21 #include "../Savegame/Transfer.h" 48 Text *_txtTitle, *_txtFunds, *_txtPurchases, *_txtCost, *_txtQuantity, *_txtSpaceUsed;
51 std::vector<TransferRow> _items;
52 std::vector<int> _rows;
53 std::vector<std::string> _cats;
54 std::set<std::string> _craftWeapons, _armors;
56 int _total, _pQty, _cQty;
59 Timer *_timerInc, *_timerDec;
61 std::string getCategory(
int sel)
const;
63 TransferRow &getRow() {
return _items[_rows[_sel]]; }
void lstItemsMousePress(Action *action)
Handler for pressing-down a mouse-button in the list.
Definition: PurchaseState.cpp:473
Container for all the information associated with a given user action, like mouse clicks...
Definition: Action.h:32
void btnOkClick(Action *action)
Handler for clicking the OK button.
Definition: PurchaseState.cpp:327
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
void cbxCategoryChange(Action *action)
Handler for changing the category filter.
Definition: PurchaseState.cpp:680
Timer used to run code in fixed intervals.
Definition: Timer.h:35
void lstItemsRightArrowPress(Action *action)
Handler for pressing a Decrease arrow in the list.
Definition: PurchaseState.cpp:435
List of Text's split into columns.
Definition: TextList.h:40
Text string displayed on screen.
Definition: Text.h:40
void updateItemStrings()
Updates the quantity-strings of the selected item.
Definition: PurchaseState.cpp:643
void decreaseByValue(int change)
Decreases the quantity of an item by the given value.
Definition: PurchaseState.cpp:614
void lstItemsLeftArrowPress(Action *action)
Handler for pressing an Increase arrow in the list.
Definition: PurchaseState.cpp:397
void think()
Runs the timers.
Definition: PurchaseState.cpp:235
void decrease()
Decreases the quantity of an item by one.
Definition: PurchaseState.cpp:603
void lstItemsRightArrowRelease(Action *action)
Handler for releasing a Decrease arrow in the list.
Definition: PurchaseState.cpp:445
Text button with a list dropdown when pressed.
Definition: ComboBox.h:36
void increaseByValue(int change)
Increases the quantity of an item by the given value.
Definition: PurchaseState.cpp:512
void increase()
Increases the quantity of an item by one.
Definition: PurchaseState.cpp:501
PurchaseState(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:407
Represents a player base on the globe.
Definition: Base.h:45
~PurchaseState()
Cleans up the Purchase state.
Definition: PurchaseState.cpp:226
Coloured button with a text label.
Definition: TextButton.h:38
Definition: Transfer.h:28
void lstItemsRightArrowClick(Action *action)
Handler for clicking a Decrease arrow in the list.
Definition: PurchaseState.cpp:458
void btnCancelClick(Action *action)
Handler for clicking the Cancel button.
Definition: PurchaseState.cpp:388
void updateList()
Updates the item list.
Definition: PurchaseState.cpp:285
Purchase/Hire screen that lets the player buy new items for a base.
Definition: PurchaseState.h:41
Definition: BaseInfoState.cpp:40
void lstItemsLeftArrowClick(Action *action)
Handler for clicking an Increase arrow in the list.
Definition: PurchaseState.cpp:420