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:729
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 lstItemsMousePress(Action *action)
Handler for pressing-down a mouse-button in the list.
Definition: TransferItemsState.cpp:535
Timer used to run code in fixed intervals.
Definition: Timer.h:35
void updateList()
Updates the item list.
Definition: TransferItemsState.cpp:277
List of Text's split into columns.
Definition: TextList.h:40
void cbxCategoryChange(Action *action)
Handler for changing the category filter.
Definition: TransferItemsState.cpp:787
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:459
int getTotal() const
Gets the total of the transfer.
Definition: TransferItemsState.cpp:759
void lstItemsLeftArrowClick(Action *action)
Handler for clicking an Increase arrow in the list.
Definition: TransferItemsState.cpp:482
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:57
void increase()
Increases the quantity of an item by one.
Definition: TransferItemsState.cpp:563
void completeTransfer()
Completes the transfer between bases.
Definition: TransferItemsState.cpp:328
void btnCancelClick(Action *action)
Handler for clicking the Cancel button.
Definition: TransferItemsState.cpp:449
void lstItemsLeftArrowRelease(Action *action)
Handler for releasing an Increase arrow in the list.
Definition: TransferItemsState.cpp:469
void decrease()
Decreases the quantity of an item by one.
Definition: TransferItemsState.cpp:678
void think()
Runs the timers.
Definition: TransferItemsState.cpp:227
void lstItemsRightArrowPress(Action *action)
Handler for pressing a Decrease arrow in the list.
Definition: TransferItemsState.cpp:497
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:218
void increaseByValue(int change)
Increases the quantity of an item by the given value.
Definition: TransferItemsState.cpp:574
void btnOkClick(Action *action)
Handler for clicking the OK button.
Definition: TransferItemsState.cpp:320
void lstItemsRightArrowRelease(Action *action)
Handler for releasing a Decrease arrow in the list.
Definition: TransferItemsState.cpp:507
void decreaseByValue(int change)
Decreases the quantity of an item by the given value.
Definition: TransferItemsState.cpp:689
Definition: BaseInfoState.cpp:40
void lstItemsRightArrowClick(Action *action)
Handler for clicking a Decrease arrow in the list.
Definition: TransferItemsState.cpp:520