20 #include "../Engine/State.h" 21 #include "../Savegame/Transfer.h" 22 #include "../Menu/OptionsBaseState.h" 48 Text *_txtTitle, *_txtSales, *_txtFunds, *_txtQuantity, *_txtSell, *_txtValue, *_txtSpaceUsed;
51 std::vector<TransferRow> _items;
52 std::vector<int> _rows;
53 std::vector<std::string> _cats;
54 std::set<std::string> _craftWeapons, _armors;
58 Timer *_timerInc, *_timerDec;
60 OptionsOrigin _origin;
62 std::string getCategory(
int sel)
const;
64 TransferRow &getRow() {
return _items[_rows[_sel]]; }
void lstItemsMousePress(Action *action)
Handler for pressing-down a mouse-button in the list.
Definition: SellState.cpp:563
Container for all the information associated with a given user action, like mouse clicks...
Definition: Action.h:32
void lstItemsRightArrowPress(Action *action)
Handler for pressing a Decrease arrow in the list.
Definition: SellState.cpp:525
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
Timer used to run code in fixed intervals.
Definition: Timer.h:35
List of Text's split into columns.
Definition: TextList.h:40
void btnOkClick(Action *action)
Handler for clicking the OK button.
Definition: SellState.cpp:356
void think()
Runs the timers.
Definition: SellState.cpp:264
Text string displayed on screen.
Definition: Text.h:40
void lstItemsLeftArrowClick(Action *action)
Handler for clicking an Increase arrow in the list.
Definition: SellState.cpp:510
Sell/Sack screen that lets the player sell any items in a particular base.
Definition: SellState.h:42
void updateList()
Updates the item list.
Definition: SellState.cpp:314
void decrease()
Decreases the quantity of an item by one.
Definition: SellState.cpp:663
void btnCancelClick(Action *action)
Handler for clicking the Cancel button.
Definition: SellState.cpp:478
void lstItemsRightArrowRelease(Action *action)
Handler for releasing a Decrease arrow in the list.
Definition: SellState.cpp:535
Text button with a list dropdown when pressed.
Definition: ComboBox.h:36
void cbxCategoryChange(Action *action)
Handler for changing the category filter.
Definition: SellState.cpp:718
SellState(Base *base, OptionsOrigin origin=OPT_GEOSCAPE)
Creates the Sell state.
Definition: SellState.cpp:59
void updateItemStrings()
Updates the quantity-strings of the selected item.
Definition: SellState.cpp:673
void lstItemsRightArrowClick(Action *action)
Handler for clicking a Decrease arrow in the list.
Definition: SellState.cpp:548
void increase()
Increases the quantity of an item by one.
Definition: SellState.cpp:591
Represents a player base on the globe.
Definition: Base.h:45
Coloured button with a text label.
Definition: TextButton.h:38
Definition: Transfer.h:28
~SellState()
Cleans up the Sell state.
Definition: SellState.cpp:255
void lstItemsLeftArrowRelease(Action *action)
Handler for releasing an Increase arrow in the list.
Definition: SellState.cpp:497
void changeByValue(int change, int dir)
Changes the quantity of an item by the given value.
Definition: SellState.cpp:603
Definition: BaseInfoState.cpp:40
void lstItemsLeftArrowPress(Action *action)
Handler for pressing an Increase arrow in the list.
Definition: SellState.cpp:487