diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-08-26 18:25:58 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-08-26 18:25:58 +0300 |
commit | 2e7bfc350d38e16b3d340f8e4ea69e6ff6748f5c (patch) | |
tree | 33145fb3c8cb2471efb0424b7ccfdf0c05a03d36 /src | |
parent | 4d8ed7fdb14bea874a9385a6808d27caced9802a (diff) | |
download | plus-2e7bfc350d38e16b3d340f8e4ea69e6ff6748f5c.tar.gz plus-2e7bfc350d38e16b3d340f8e4ea69e6ff6748f5c.tar.bz2 plus-2e7bfc350d38e16b3d340f8e4ea69e6ff6748f5c.tar.xz plus-2e7bfc350d38e16b3d340f8e4ea69e6ff6748f5c.zip |
Add auction buttons in shop window for send buy or sell list to auction bot.
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/shopwindow.cpp | 14 | ||||
-rw-r--r-- | src/gui/shopwindow.h | 2 |
2 files changed, 16 insertions, 0 deletions
diff --git a/src/gui/shopwindow.cpp b/src/gui/shopwindow.cpp index 4311a04d2..0988ef759 100644 --- a/src/gui/shopwindow.cpp +++ b/src/gui/shopwindow.cpp @@ -119,9 +119,11 @@ ShopWindow::ShopWindow(): mBuyAddButton = new Button(_("Add"), "add buy", this); mBuyDeleteButton = new Button(_("Delete"), "delete buy", this); mBuyAnnounceButton = new Button(_("Announce"), "announce buy", this); + mBuyAuctionButton = new Button(_("Auction"), "auction buy", this); mSellAddButton = new Button(_("Add"), "add sell", this); mSellDeleteButton = new Button(_("Delete"), "delete sell", this); mSellAnnounceButton = new Button(_("Announce"), "announce sell", this); + mSellAuctionButton = new Button(_("Auction"), "auction sell", this); mAnnounceLinks = new CheckBox(_("Show links in announce"), false, this, "link announce"); @@ -135,9 +137,11 @@ ShopWindow::ShopWindow(): place(0, 6, mBuyAddButton); place(1, 6, mBuyDeleteButton); place(3, 6, mBuyAnnounceButton); + place(4, 6, mBuyAuctionButton); place(8, 6, mSellAddButton); place(9, 6, mSellDeleteButton); place(11, 6, mSellAnnounceButton); + place(12, 6, mSellAuctionButton); place(0, 7, mAnnounceLinks, 8); place(15, 7, mCloseButton); @@ -207,6 +211,16 @@ void ShopWindow::action(const gcn::ActionEvent &event) { announce(mSellShopItems, SELL); } + else if (event.getId() == "auction buy" && mBuyShopItems + && mBuyShopItems->getNumberOfElements() > 0) + { + Net::getChatHandler()->privateMessage("AuctionBot", "!pull4144 seek"); + } + else if (event.getId() == "auction sell" && mSellShopItems + && mSellShopItems->getNumberOfElements() > 0) + { + Net::getChatHandler()->privateMessage("AuctionBot", "!pull4144 offer"); + } if (mSelectedItem < 1) return; diff --git a/src/gui/shopwindow.h b/src/gui/shopwindow.h index e3fd9a5ca..8b170f31e 100644 --- a/src/gui/shopwindow.h +++ b/src/gui/shopwindow.h @@ -151,9 +151,11 @@ class ShopWindow : public Window, public gcn::ActionListener, gcn::Button *mBuyAddButton; gcn::Button *mBuyDeleteButton; gcn::Button *mBuyAnnounceButton; + gcn::Button *mBuyAuctionButton; gcn::Button *mSellAddButton; gcn::Button *mSellDeleteButton; gcn::Button *mSellAnnounceButton; + gcn::Button *mSellAuctionButton; gcn::CheckBox *mAnnounceLinks; ShopItems *mBuyShopItems; |