20 #include "../Engine/State.h" 21 #include "../Savegame/Transfer.h" 44 Base *_baseFrom, *_baseTo;
47 Text *_txtTitle, *_txtQuantity, *_txtAmountTransfer, *_txtAmountDestination;
50 std::vector<TransferRow> _items;
51 std::vector<int> _rows;
52 std::vector<std::string> _cats;
53 std::set<std::string> _craftWeapons, _armors;
55 int _total, _pQty, _cQty, _aQty;
59 Timer *_timerInc, *_timerDec;
61 std::string getCategory(
int sel)
const;
63 TransferRow &getRow() {
return _items[_rows[_sel]]; }
65 double getDistance()
const;
Container for all the information associated with a given user action, like mouse clicks...
Definition: Action.h:32
void updateItemStrings()
Updates the quantity-strings of the selected item.
Definition: TransferItemsState.cpp:730
A game state that receives user input and reacts accordingly.
Definition: State.h:43
Box with a coloured border and custom background.
Definition: Window.h:40
void lstItemsMousePress(Action *action)
Handler for pressing-down a mouse-button in the list.
Definition: TransferItemsState.cpp:536
Timer used to run code in fixed intervals.
Definition: Timer.h:35
void updateList()
Updates the item list.
Definition: TransferItemsState.cpp:278
List of Text's split into columns.
Definition: TextList.h:40
void cbxCategoryChange(Action *action)
Handler for changing the category filter.
Definition: TransferItemsState.cpp:788
Text string displayed on screen.
Definition: Text.h:40
void lstItemsLeftArrowPress(Action *action)
Handler for pressing an Increase arrow in the list.
Definition: TransferItemsState.cpp:460
int getTotal() const
Gets the total of the transfer.
Definition: TransferItemsState.cpp:760
void lstItemsLeftArrowClick(Action *action)
Handler for clicking an Increase arrow in the list.
Definition: TransferItemsState.cpp:483
Text button with a list dropdown when pressed.
Definition: ComboBox.h:36
TransferItemsState(Base *baseFrom, Base *baseTo)
Creates the Transfer Items state.
Definition: TransferItemsState.cpp:58
void increase()
Increases the quantity of an item by one.
Definition: TransferItemsState.cpp:564
void completeTransfer()
Completes the transfer between bases.
Definition: TransferItemsState.cpp:329
void btnCancelClick(Action *action)
Handler for clicking the Cancel button.
Definition: TransferItemsState.cpp:450
void lstItemsLeftArrowRelease(Action *action)
Handler for releasing an Increase arrow in the list.
Definition: TransferItemsState.cpp:470
void decrease()
Decreases the quantity of an item by one.
Definition: TransferItemsState.cpp:679
void think()
Runs the timers.
Definition: TransferItemsState.cpp:228
void lstItemsRightArrowPress(Action *action)
Handler for pressing a Decrease arrow in the list.
Definition: TransferItemsState.cpp:498
Represents a player base on the globe.
Definition: Base.h:45
Coloured button with a text label.
Definition: TextButton.h:38
Transfer screen that lets the player pick what items to transfer between bases.
Definition: TransferItemsState.h:41
Definition: Transfer.h:28
~TransferItemsState()
Cleans up the Transfer Items state.
Definition: TransferItemsState.cpp:219
void increaseByValue(int change)
Increases the quantity of an item by the given value.
Definition: TransferItemsState.cpp:575
void btnOkClick(Action *action)
Handler for clicking the OK button.
Definition: TransferItemsState.cpp:321
void lstItemsRightArrowRelease(Action *action)
Handler for releasing a Decrease arrow in the list.
Definition: TransferItemsState.cpp:508
void decreaseByValue(int change)
Decreases the quantity of an item by the given value.
Definition: TransferItemsState.cpp:690
Definition: BaseInfoState.cpp:40
void lstItemsRightArrowClick(Action *action)
Handler for clicking a Decrease arrow in the list.
Definition: TransferItemsState.cpp:521