19 #ifndef OPENXCOM_PURCHASESTATE_H
20 #define OPENXCOM_PURCHASESTATE_H
22 #include "../Engine/State.h"
40 class PurchaseState :
public State
45 TextButton *_btnOk, *_btnCancel;
46 TextButton *_btnPurchaseTab, *_btnPersonnel, *_btnCraft, *_btnItems;
49 Text *_txtTitle, *_txtFunds, *_txtPurchases, *_txtItem, *_txtCost, *_txtQuantity, *_txtInStorage;
50 TextList *_lstPersonnel, *_lstCraft, *_lstItems;
51 std::vector<std::string> _crafts, _items, _craftItems;
52 std::vector<int> _qtys, _qtysPersonnel, _qtysCraft;
54 int _total, _pQty, _cQty;
56 Timer *_timerInc, *_timerDec;
57 int _changeValueByMouseWheel;
58 bool _allowChangeListValuesByMouseWheel;
void lstItemsMousePress(Action *action)
Handler for pressing-down a mouse-button in the list.
Definition: PurchaseState.cpp:398
void btnOkClick(Action *action)
Handler for clicking the OK button.
Definition: PurchaseState.cpp:252
void lstItemsRightArrowPress(Action *action)
Handler for pressing a Decrease arrow in the list.
Definition: PurchaseState.cpp:360
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 btnItemsClick(Action *action)
Handler for clicking the Items tab.
Definition: PurchaseTabbedState.cpp:392
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
~PurchaseState()
Cleans up the Purchase state.
Definition: PurchaseState.cpp:214
void btnPersonnelClick(Action *action)
Handler for clicking the Personnel tab.
Definition: PurchaseTabbedState.cpp:364
void lstItemsRightArrowClick(Action *action)
Handler for clicking a Decrease arrow in the list.
Definition: PurchaseState.cpp:383
void btnCancelClick(Action *action)
Handler for clicking the Cancel button.
Definition: PurchaseState.cpp:313
void btnCraftClick(Action *action)
Handler for clicking the Craft tab.
Definition: PurchaseTabbedState.cpp:378
void lstItemsLeftArrowClick(Action *action)
Handler for clicking an Increase arrow in the list.
Definition: PurchaseState.cpp:345