summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-12-26 19:02:19 +0300
committerAndrei Karas <akaras@inbox.ru>2017-12-26 19:02:19 +0300
commitea40cd4fa5e65698cbabb3649e2d5641f47df265 (patch)
tree71008ed2918993214b1044cbeb1f5dd1944b30d2 /src/gui
parent49ab9391a9d49580603858b1222dd39542111583 (diff)
downloadmanaplus-ea40cd4fa5e65698cbabb3649e2d5641f47df265.tar.gz
manaplus-ea40cd4fa5e65698cbabb3649e2d5641f47df265.tar.bz2
manaplus-ea40cd4fa5e65698cbabb3649e2d5641f47df265.tar.xz
manaplus-ea40cd4fa5e65698cbabb3649e2d5641f47df265.zip
Remove default parameters from inttextfield.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/widgets/inttextfield.h12
-rw-r--r--src/gui/windows/bankwindow.cpp3
-rw-r--r--src/gui/windows/buydialog.cpp2
-rw-r--r--src/gui/windows/editserverdialog.cpp3
-rw-r--r--src/gui/windows/itemamountwindow.cpp4
-rw-r--r--src/gui/windows/maileditwindow.cpp2
-rw-r--r--src/gui/windows/npcdialog.cpp2
-rw-r--r--src/gui/windows/textcommandeditor.cpp6
8 files changed, 18 insertions, 16 deletions
diff --git a/src/gui/widgets/inttextfield.h b/src/gui/widgets/inttextfield.h
index b8ac8564f..7dfacbe2b 100644
--- a/src/gui/widgets/inttextfield.h
+++ b/src/gui/widgets/inttextfield.h
@@ -36,12 +36,12 @@ class IntTextField final : public TextField
/**
* Constructor, sets default value.
*/
- explicit IntTextField(const Widget2 *const widget,
- const int def = 0,
- const int min = 0,
- const int max = 0,
- const Enable enabled = Enable_true,
- const int width = 0);
+ IntTextField(const Widget2 *const widget,
+ const int def,
+ const int min,
+ const int max,
+ const Enable enabled,
+ const int width);
A_DELETE_COPY(IntTextField)
diff --git a/src/gui/windows/bankwindow.cpp b/src/gui/windows/bankwindow.cpp
index b3c498d4b..e02660243 100644
--- a/src/gui/windows/bankwindow.cpp
+++ b/src/gui/windows/bankwindow.cpp
@@ -46,7 +46,8 @@ BankWindow::BankWindow() :
mBankMoneyLabel(new Label(this, strprintf(
// TRANSLATORS: bank window money label
_("Money in bank: %s"), " "))),
- mInputMoneyTextField(new IntTextField(this, 0, 0, 2147483647)),
+ mInputMoneyTextField(new IntTextField(this, 0, 0, 2147483647,
+ Enable_true, 0)),
// TRANSLATORS: bank window button
mWithdrawButton(new Button(this, _("Withdraw"), "withdraw", this)),
// TRANSLATORS: bank window button
diff --git a/src/gui/windows/buydialog.cpp b/src/gui/windows/buydialog.cpp
index 14e3aabe0..901b8f199 100644
--- a/src/gui/windows/buydialog.cpp
+++ b/src/gui/windows/buydialog.cpp
@@ -317,7 +317,7 @@ void BuyDialog::init()
// TRANSLATORS: buy dialog label
_("Price: %s / Total: %s"), "", ""));
- mAmountField = new IntTextField(this, 1, 1, 123);
+ mAmountField = new IntTextField(this, 1, 1, 123, Enable_true, 0);
mAmountField->setActionEventId("amount");
mAmountField->addActionListener(this);
mAmountField->setSendAlwaysEvents(true);
diff --git a/src/gui/windows/editserverdialog.cpp b/src/gui/windows/editserverdialog.cpp
index 692fe8287..3b454466f 100644
--- a/src/gui/windows/editserverdialog.cpp
+++ b/src/gui/windows/editserverdialog.cpp
@@ -52,7 +52,8 @@ EditServerDialog::EditServerDialog(ServerDialog *const parent,
mNameField(new TextField(this, std::string())),
mDescriptionField(new TextField(this, std::string())),
mOnlineListUrlField(new TextField(this, std::string())),
- mPacketVersionField(new IntTextField(this, 0, 0, maxPacketVersion)),
+ mPacketVersionField(new IntTextField(this, 0, 0, maxPacketVersion,
+ Enable_true, 0)),
// TRANSLATORS: edit server dialog button
mConnectButton(new Button(this, _("Connect"), "connect", this)),
// TRANSLATORS: edit server dialog button
diff --git a/src/gui/windows/itemamountwindow.cpp b/src/gui/windows/itemamountwindow.cpp
index d8e1c3da0..773e53e82 100644
--- a/src/gui/windows/itemamountwindow.cpp
+++ b/src/gui/windows/itemamountwindow.cpp
@@ -135,7 +135,7 @@ ItemAmountWindow::ItemAmountWindow(const ItemAmountWindowUsageT usage,
Window("", Modal_false, parent, "amount.xml"),
ActionListener(),
KeyListener(),
- mItemAmountTextField(new IntTextField(this, 1)),
+ mItemAmountTextField(new IntTextField(this, 1, 0, 0, Enable_true, 0)),
mItemPriceTextField(nullptr),
mGPLabel(nullptr),
mItem(item),
@@ -171,7 +171,7 @@ ItemAmountWindow::ItemAmountWindow(const ItemAmountWindowUsageT usage,
if (mUsage == ItemAmountWindowUsage::ShopBuyAdd ||
mUsage == ItemAmountWindowUsage::ShopSellAdd)
{
- mItemPriceTextField = new IntTextField(this, 1);
+ mItemPriceTextField = new IntTextField(this, 1, 0, 0, Enable_true, 0);
mItemPriceTextField->setRange(1, 10000000);
mItemPriceTextField->setWidth(35);
mItemPriceTextField->addKeyListener(this);
diff --git a/src/gui/windows/maileditwindow.cpp b/src/gui/windows/maileditwindow.cpp
index 08f70b4fa..1da222b30 100644
--- a/src/gui/windows/maileditwindow.cpp
+++ b/src/gui/windows/maileditwindow.cpp
@@ -72,7 +72,7 @@ MailEditWindow::MailEditWindow() :
mToField(new TextField(this)),
mSubjectField(new TextField(this)),
mMoneyField(new IntTextField(this, 0, 0,
- settings.enableNewMailSystem ? INT_MAX : 10000000)),
+ settings.enableNewMailSystem ? INT_MAX : 10000000, Enable_true, 0)),
mMessageField(new TextField(this)),
mInventory(new Inventory(InventoryType::MailEdit,
settings.enableNewMailSystem ? -1 : 1)),
diff --git a/src/gui/windows/npcdialog.cpp b/src/gui/windows/npcdialog.cpp
index bb770d1e0..c59d66b48 100644
--- a/src/gui/windows/npcdialog.cpp
+++ b/src/gui/windows/npcdialog.cpp
@@ -121,7 +121,7 @@ NpcDialog::NpcDialog(const BeingId npcId) :
"npc_listbackground.xml")),
mItemLinkHandler(new ItemLinkHandler),
mTextField(new TextField(this, "")),
- mIntField(new IntTextField(this)),
+ mIntField(new IntTextField(this, 0, 0, 0, Enable_true, 0)),
// TRANSLATORS: npc dialog button
mPlusButton(new Button(this, _("+"), "inc", this)),
// TRANSLATORS: npc dialog button
diff --git a/src/gui/windows/textcommandeditor.cpp b/src/gui/windows/textcommandeditor.cpp
index 2210b2870..62ffc36f8 100644
--- a/src/gui/windows/textcommandeditor.cpp
+++ b/src/gui/windows/textcommandeditor.cpp
@@ -86,17 +86,17 @@ TextCommandEditor::TextCommandEditor(TextCommand *const command) :
#ifdef TMWA_SUPPORT
// TRANSLATORS: command editor label
mManaLabel(new Label(this, _("Mana:"))),
- mManaField(new IntTextField(this, 0)),
+ mManaField(new IntTextField(this, 0, 0, 0, Enable_true, 0)),
// TRANSLATORS: command editor label
mMagicLvlLabel(new Label(this, _("Magic level:"))),
- mMagicLvlField(new IntTextField(this, 0)),
+ mMagicLvlField(new IntTextField(this, 0, 0, 0, Enable_true, 0)),
mMagicSchoolModel(new MagicSchoolModel),
// TRANSLATORS: command editor label
mSchoolLabel(new Label(this, _("Magic School:"))),
mSchoolDropDown(new DropDown(this, mMagicSchoolModel)),
// TRANSLATORS: command editor label
mSchoolLvlLabel(new Label(this, _("School level:"))),
- mSchoolLvlField(new IntTextField(this, 0)),
+ mSchoolLvlField(new IntTextField(this, 0, 0, 0, Enable_true, 0)),
#endif // TMWA_SUPPORT
// TRANSLATORS: command editor button
mCancelButton(new Button(this, _("Cancel"), "cancel", this)),