summaryrefslogtreecommitdiff
path: root/src/gui/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/widgets')
-rw-r--r--src/gui/widgets/selldialog.cpp10
-rw-r--r--src/gui/widgets/selldialog.h5
2 files changed, 8 insertions, 7 deletions
diff --git a/src/gui/widgets/selldialog.cpp b/src/gui/widgets/selldialog.cpp
index 956cacb2f..8488e4157 100644
--- a/src/gui/widgets/selldialog.cpp
+++ b/src/gui/widgets/selldialog.cpp
@@ -48,7 +48,7 @@
SellDialog::DialogList SellDialog::instances;
SellDialog::SellDialog(const IsSell isSell,
- const bool advanced) :
+ const Advanced advanced) :
// TRANSLATORS: sell dialog name
Window(_("Sell"), Modal_false, nullptr, "sell.xml"),
ActionListener(),
@@ -89,7 +89,7 @@ void SellDialog::postInit()
// Create a ShopItems instance, that is aware of duplicate entries.
mShopItems = new ShopItems(true);
- if (mAdvanced)
+ if (mAdvanced == Advanced_true)
mShopItems->setMergeDuplicates(false);
mShopItemList = CREATEWIDGETR(ShopListBox,
@@ -103,7 +103,7 @@ void SellDialog::postInit()
mSellButton = new Button(this,
// TRANSLATORS: sell dialog button
- mAdvanced ? _("Add") : _("Sell"),
+ mAdvanced == Advanced_true ? _("Add") : _("Sell"),
"presell",
this);
// TRANSLATORS: sell dialog button
@@ -138,7 +138,7 @@ void SellDialog::postInit()
// TRANSLATORS: sell dialog label
mMoneyLabel = new Label(this, strprintf(_("Price: %s / Total: %s"),
"", ""));
- if (mAdvanced)
+ if (mAdvanced == Advanced_true)
{
// TRANSLATORS: sell dialog button
mConfirmButton = new Button(this, _("Sell"), "confirm", this);
@@ -160,7 +160,7 @@ void SellDialog::postInit()
placer(5, 5, mQuantityLabel, 2);
placer(7, 5, mAddMaxButton);
placer(0, 6, mMoneyLabel, 8);
- if (mAdvanced)
+ if (mAdvanced == Advanced_true)
{
placer(5, 7, mSellButton);
placer(6, 7, mConfirmButton);
diff --git a/src/gui/widgets/selldialog.h b/src/gui/widgets/selldialog.h
index 709756990..5b907b882 100644
--- a/src/gui/widgets/selldialog.h
+++ b/src/gui/widgets/selldialog.h
@@ -23,6 +23,7 @@
#ifndef GUI_WIDGETS_SELLDIALOG_H
#define GUI_WIDGETS_SELLDIALOG_H
+#include "enums/simpletypes/advanced.h"
#include "enums/simpletypes/issell.h"
#include "enums/simpletypes/itemcolor.h"
@@ -54,7 +55,7 @@ class SellDialog notfinal : public Window,
* Constructor.
*/
SellDialog(const IsSell isSell,
- const bool advanced);
+ const Advanced advanced);
A_DELETE_COPY(SellDialog)
@@ -146,7 +147,7 @@ class SellDialog notfinal : public Window,
int mAmountItems;
IsSell mIsSell;
- bool mAdvanced;
+ Advanced mAdvanced;
};
#endif // GUI_WIDGETS_SELLDIALOG_H