68 #define CAPTION_PROPOSE _("Propose trade")
70 #define CAPTION_CONFIRMED _("Confirmed. Waiting...")
72 #define CAPTION_ACCEPT _("Agree trade")
74 #define CAPTION_ACCEPTED _("Agreed. Waiting...")
94 mMoneyChangeButton(
new Button(this,
_(
"Change"),
"money",
141 Label *
const moneyLabel2 =
new Label(
this,
_(
"You give:"));
149 placer(0, 0, moneyLabel2, 1, 1);
156 layout.
extend(0, 2, 2, 1);
206 const uint8_t refine,
227 const int *
const cards,
232 const uint8_t refine,
237 const Equipm equipment)
const
240 const int slot = inv->
addItem(
id,
258 const int quantity)
const
270 const int quantity)
const
320 const bool check)
const
384 const std::string &eventId =
event.
getId();
386 if (eventId ==
"add")
415 else if (eventId ==
"cancel")
422 else if (eventId ==
"ok")
431 else if (eventId ==
"trade")
437 else if (eventId ==
"money")
528 const int itemId = item->
getId();
534 if ((tItem !=
nullptr) && (tItem->
getQuantity() > 1
541 "overlap one kind of item on the window."),
555 _(
"Failed adding item. You can not trade equipped items."),
void chatLog(std::string line, ChatMsgTypeT own, const IgnoreRecord ignoreRecord, const TryRemoveColors tryRemoveColors)
bool getBoolValue(const std::string &key) const
Widget * getSource() const
int getWidth(const std::string &text) const
static bool createScreenshot(const std::string &prefix)
Font * getSecureFont() const
void setVisible(Visible visible)
Item * getSelectedItem() const
void setCards(const int index, const int *const cards, const int size) const
Item * getItem(const int index) const
void setOptions(const int index, const ItemOptionsList *const options)
Item * findItem(const int itemId, const ItemColor color) const
int addItem(const int id, const ItemTypeT type, const int quantity, const uint8_t refine, const ItemColor color, const Identified identified, const Damaged damaged, const Favorite favorite, const Equipm equipment, const Equipped equipped)
static void showWindow(const ItemAmountWindowUsageT usage, Window *const parent, Item *const item, int maxRange, const int tag)
void addSelectionListener(SelectionListener *listener)
Item * getSelectedItem() const
void setQuantity(const int quantity)
Equipped isEquipped() const
ItemColor getColor() const
void increaseQuantity(const int amount)
void setForegroundColorAll(const Color &color1, const Color &color2)
void setCaption(const std::string &caption)
void extend(const int x, const int y, const int w, const int h)
LayoutCell & setPadding(int p)
void setRowHeight(const int n, const int h)
void setColWidth(const int n, const int w)
virtual void setMoney(const int amount) const
virtual void confirm() const
virtual void cancel() const
virtual void addItem(const Item *const item, const int amount) const
virtual void finish() const
bool isGoodName(Being *const being) const
void registerWindowForReset(Window *const window)
const std::string & getText() const
void setText(const std::string &text)
std::string mAutoAddToNick
void valueChanged(const SelectionEvent &event)
Button * mMoneyChangeButton
ItemContainer * mPartnerItemContainer
void addAutoMoney(const std::string &nick, const int money)
bool isInpupFocused() const
void addItem(const int id, const ItemTypeT type, const bool own, const int quantity, const uint8_t refine, const ItemColor color, const Identified identified, const Damaged damaged, const Favorite favorite) const
ItemContainer * mMyItemContainer
void setMoney(const int quantity)
void receivedOk(const bool own)
void initTrade(const std::string &nick)
Inventory * mPartnerInventory
void setStatus(const Status s)
void action(const ActionEvent &event)
bool checkItem(const Item *const item) const
void changeQuantity(const int index, const bool own, const int quantity) const
void addItem2(const int id, const ItemTypeT type, const int *const cards, const ItemOptionsList *const options, const int sz, const bool own, const int quantity, const uint8_t refine, const ItemColor color, const Identified identified, const Damaged damaged, const Favorite favorite, const Equipm equipment) const
void increaseQuantity(const int index, const bool own, const int quantity) const
void tradeItem(const Item *const item, const int quantity, const bool check) const
void addAutoItem(const std::string &nick, Item *const item, const int amount)
void setResizable(const bool resize)
ContainerPlacer getPlacer(const int x, const int y)
virtual void setVisible(Visible visible)
bool isWindowVisible() const
void setWindowName(const std::string &name)
void setCaptionFont(Font *font)
void setMinHeight(const int height)
void setMinWidth(const int width)
void enableVisibleSound(bool b)
void setCloseButton(const bool flag)
void setStickyButtonLock(const bool sticky)
LayoutCell & place(const int x, const int y, Widget *const wg, const int w, const int h)
const bool Equipped_false
const bool ForceQuantity_false
const bool IgnoreRecord_false
InventoryWindow * inventoryWindow
LocalPlayer * localPlayer
const bool LoseFocusOnTab_true
ServerTypeT getNetworkType()
Inventory * getInventory()
int32_t getAttribute(const AttributesT id)
void setTrading(const Trading trading)
bool isItemProtected(const int id)
std::string formatCurrency(const int value)
Net::TradeHandler * tradeHandler
PlayerRelationsManager playerRelations
SetupWindow * setupWindow
const bool ShowEmptyRows_false
std::string strprintf(const char *const format,...)
TradeWindow * tradeWindow
#define CAPTION_CONFIRMED
const bool TryRemoveColors_true