summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/shopwindow.cpp18
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);