26#include <guichan/actionlistener.hpp>
27#include <guichan/selectionlistener.hpp>
56 void addItem(
int id,
bool own,
int quantity);
66 void addItem(
int id,
bool own,
int quantity,
bool equipment);
87 void valueChanged(
const gcn::SelectionEvent &event)
override;
92 void action(
const gcn::ActionEvent &event)
override;
98 void close()
override;
Represents one or more instances of a certain item type.
void addItem(int id, bool own, int quantity)
Add an item to the trade window.
void action(const gcn::ActionEvent &event) override
Called when receiving actions from the widgets.
void reset()
Reset both item containers.
@ PREPARING
Players are adding items.
@ ACCEPTED
Local player has accepted the trade.
@ ACCEPTING
Accepting the trade.
@ PROPOSING
Local player has confirmed the trade.
void receivedOk(bool own)
Player received ok message from server.
void valueChanged(const gcn::SelectionEvent &event) override
Updates the labels and makes sure only one item is selected in either my inventory or partner invento...
const std::unique_ptr< Inventory > mPartnerInventory
gcn::Button * mMoneyChangeButton
void setStatus(Status s)
Sets the current status of the trade.
ItemContainer * mPartnerItemContainer
void increaseQuantity(int index, bool own, int quantity)
Increase quantity of an item.
void changeQuantity(int index, bool own, int quantity)
Change quantity of an item.
ItemContainer * mMyItemContainer
const std::unique_ptr< Inventory > mMyInventory
void addItem(int id, bool own, int quantity, bool equipment)
Add an item to the trade window.
gcn::TextField * mMoneyField
void setMoney(int quantity)
Displays expected money in the trade window.
void close() override
Closes the Trade Window, as well as telling the server that the window has been closed.
TradeWindow * tradeWindow