diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-08-30 03:26:00 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-08-30 03:26:00 +0300 |
commit | 84941829031cbd707ab28802c7423ce19bfba32e (patch) | |
tree | d1e066e36fa66e9d925cc101acb9fa3e38089113 /src/gui/shopwindow.cpp | |
parent | 9f752d5431364c052b364045015d3574da2c320c (diff) | |
download | manaverse-84941829031cbd707ab28802c7423ce19bfba32e.tar.gz manaverse-84941829031cbd707ab28802c7423ce19bfba32e.tar.bz2 manaverse-84941829031cbd707ab28802c7423ce19bfba32e.tar.xz manaverse-84941829031cbd707ab28802c7423ce19bfba32e.zip |
Add auction bot support switch.
Diffstat (limited to 'src/gui/shopwindow.cpp')
-rw-r--r-- | src/gui/shopwindow.cpp | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/src/gui/shopwindow.cpp b/src/gui/shopwindow.cpp index 0988ef759..38985a01c 100644 --- a/src/gui/shopwindow.cpp +++ b/src/gui/shopwindow.cpp @@ -40,6 +40,7 @@ #include "gui/widgets/tradetab.h" #include "actorspritemanager.h" +#include "auctionmanager.h" #include "configuration.h" #include "confirmdialog.h" #include "inventory.h" @@ -119,11 +120,9 @@ 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"); @@ -137,14 +136,25 @@ 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); + if (auctionManager && auctionManager->getEnableAuctionBot()) + { + mBuyAuctionButton = new Button(_("Auction"), "auction buy", this); + mSellAuctionButton = new Button(_("Auction"), "auction sell", this); + place(4, 6, mBuyAuctionButton); + place(12, 6, mSellAuctionButton); + } + else + { + mBuyAuctionButton = 0; + mSellAuctionButton = 0; + } + Layout &layout = getLayout(); layout.setRowHeight(0, Layout::AUTO_SET); |