summaryrefslogtreecommitdiff
path: root/src/gui/windows
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/windows')
-rw-r--r--src/gui/windows/changeemaildialog.cpp6
-rw-r--r--src/gui/windows/charcreatedialog.cpp3
-rw-r--r--src/gui/windows/editdialog.cpp3
-rw-r--r--src/gui/windows/editserverdialog.cpp15
-rw-r--r--src/gui/windows/logindialog.cpp6
-rw-r--r--src/gui/windows/maileditwindow.cpp9
-rw-r--r--src/gui/windows/npcdialog.cpp3
-rw-r--r--src/gui/windows/registerdialog.cpp10
-rw-r--r--src/gui/windows/textcommandeditor.cpp9
-rw-r--r--src/gui/windows/textdialog.cpp7
-rw-r--r--src/gui/windows/tradewindow.cpp3
11 files changed, 52 insertions, 22 deletions
diff --git a/src/gui/windows/changeemaildialog.cpp b/src/gui/windows/changeemaildialog.cpp
index 9d9358967..efb8bbcab 100644
--- a/src/gui/windows/changeemaildialog.cpp
+++ b/src/gui/windows/changeemaildialog.cpp
@@ -47,8 +47,10 @@ ChangeEmailDialog::ChangeEmailDialog(LoginData &data) :
// TRANSLATORS: change email dialog header
Window(_("Change Email Address"), Modal_true, nullptr, "changeemail.xml"),
ActionListener(),
- mFirstEmailField(new TextField(this)),
- mSecondEmailField(new TextField(this)),
+ mFirstEmailField(new TextField(this, std::string(), LoseFocusOnTab_true,
+ nullptr, std::string(), false)),
+ mSecondEmailField(new TextField(this, std::string(), LoseFocusOnTab_true,
+ nullptr, std::string(), false)),
// TRANSLATORS: button in change email dialog
mChangeEmailButton(new Button(this, _("Change Email Address"),
"change_email", this)),
diff --git a/src/gui/windows/charcreatedialog.cpp b/src/gui/windows/charcreatedialog.cpp
index 4f9c82fe2..3a760e9a3 100644
--- a/src/gui/windows/charcreatedialog.cpp
+++ b/src/gui/windows/charcreatedialog.cpp
@@ -79,7 +79,8 @@ CharCreateDialog::CharCreateDialog(CharSelectDialog *const parent,
ActionListener(),
KeyListener(),
mCharSelectDialog(parent),
- mNameField(new TextField(this, "")),
+ mNameField(new TextField(this, std::string(),
+ LoseFocusOnTab_true, nullptr, std::string(), false)),
// TRANSLATORS: char create dialog label
mNameLabel(new Label(this, _("Name:"))),
mNextHairColorButton(nullptr),
diff --git a/src/gui/windows/editdialog.cpp b/src/gui/windows/editdialog.cpp
index e14b96191..491e23b5f 100644
--- a/src/gui/windows/editdialog.cpp
+++ b/src/gui/windows/editdialog.cpp
@@ -38,7 +38,8 @@ EditDialog::EditDialog(const std::string &restrict title,
Window(title, modal, parent, "edit.xml"),
ActionListener(),
mEventOk(eventOk),
- mTextField(new TextField(this))
+ mTextField(new TextField(this, std::string(), LoseFocusOnTab_true,
+ nullptr, std::string(), false))
{
mDefaultWidth = width;
mTextField->setText(msg);
diff --git a/src/gui/windows/editserverdialog.cpp b/src/gui/windows/editserverdialog.cpp
index 3b454466f..a659612fb 100644
--- a/src/gui/windows/editserverdialog.cpp
+++ b/src/gui/windows/editserverdialog.cpp
@@ -47,11 +47,16 @@ EditServerDialog::EditServerDialog(ServerDialog *const parent,
Window(_("Edit Server"), Modal_true, parent),
ActionListener(),
KeyListener(),
- mServerAddressField(new TextField(this, std::string())),
- mPortField(new TextField(this, std::string())),
- mNameField(new TextField(this, std::string())),
- mDescriptionField(new TextField(this, std::string())),
- mOnlineListUrlField(new TextField(this, std::string())),
+ mServerAddressField(new TextField(this, std::string(),
+ LoseFocusOnTab_true, nullptr, std::string(), false)),
+ mPortField(new TextField(this, std::string(),
+ LoseFocusOnTab_true, nullptr, std::string(), false)),
+ mNameField(new TextField(this, std::string(),
+ LoseFocusOnTab_true, nullptr, std::string(), false)),
+ mDescriptionField(new TextField(this, std::string(),
+ LoseFocusOnTab_true, nullptr, std::string(), false)),
+ mOnlineListUrlField(new TextField(this, std::string(),
+ LoseFocusOnTab_true, nullptr, std::string(), false)),
mPacketVersionField(new IntTextField(this, 0, 0, maxPacketVersion,
Enable_true, 0)),
// TRANSLATORS: edit server dialog button
diff --git a/src/gui/windows/logindialog.cpp b/src/gui/windows/logindialog.cpp
index f9f63fef3..f43921328 100644
--- a/src/gui/windows/logindialog.cpp
+++ b/src/gui/windows/logindialog.cpp
@@ -69,7 +69,8 @@ LoginDialog::LoginDialog(LoginData &data,
KeyListener(),
mLoginData(&data),
mServer(server),
- mUserField(new TextField(this, mLoginData->username)),
+ mUserField(new TextField(this, mLoginData->username,
+ LoseFocusOnTab_true, nullptr, std::string(), false)),
mPassField(new PasswordField(this, mLoginData->password)),
// TRANSLATORS: login dialog label
mKeepCheck(new CheckBox(this, _("Remember username"),
@@ -89,7 +90,8 @@ LoginDialog::LoginDialog(LoginData &data,
(mLoginData->updateType & UpdateType::Custom) != 0,
this, "customhost")),
mUpdateHostText(new TextField(this, serverConfig.getValue(
- "customUpdateHost", ""))),
+ "customUpdateHost", ""),
+ LoseFocusOnTab_true, nullptr, std::string(), false)),
mUpdateListModel(nullptr),
mUpdateHostDropDown(nullptr),
mUpdateHost(updateHost),
diff --git a/src/gui/windows/maileditwindow.cpp b/src/gui/windows/maileditwindow.cpp
index 1da222b30..b70188786 100644
--- a/src/gui/windows/maileditwindow.cpp
+++ b/src/gui/windows/maileditwindow.cpp
@@ -69,11 +69,14 @@ MailEditWindow::MailEditWindow() :
mItemLabel(new Label(this, _("Item:"))),
// TRANSLATORS: mail edit window label
mMessageLabel(new Label(this, _("Message:"))),
- mToField(new TextField(this)),
- mSubjectField(new TextField(this)),
+ mToField(new TextField(this, std::string(), LoseFocusOnTab_true,
+ nullptr, std::string(), false)),
+ mSubjectField(new TextField(this, std::string(), LoseFocusOnTab_true,
+ nullptr, std::string(), false)),
mMoneyField(new IntTextField(this, 0, 0,
settings.enableNewMailSystem ? INT_MAX : 10000000, Enable_true, 0)),
- mMessageField(new TextField(this)),
+ mMessageField(new TextField(this, std::string(), LoseFocusOnTab_true,
+ nullptr, std::string(), false)),
mInventory(new Inventory(InventoryType::MailEdit,
settings.enableNewMailSystem ? -1 : 1)),
mItemContainer(new ItemContainer(this, mInventory, 100000,
diff --git a/src/gui/windows/npcdialog.cpp b/src/gui/windows/npcdialog.cpp
index c59d66b48..e3a8a0292 100644
--- a/src/gui/windows/npcdialog.cpp
+++ b/src/gui/windows/npcdialog.cpp
@@ -120,7 +120,8 @@ NpcDialog::NpcDialog(const BeingId npcId) :
fromBool(getOptionBool("showlistbackground"), Opaque),
"npc_listbackground.xml")),
mItemLinkHandler(new ItemLinkHandler),
- mTextField(new TextField(this, "")),
+ mTextField(new TextField(this, std::string(), LoseFocusOnTab_true,
+ nullptr, std::string(), false)),
mIntField(new IntTextField(this, 0, 0, 0, Enable_true, 0)),
// TRANSLATORS: npc dialog button
mPlusButton(new Button(this, _("+"), "inc", this)),
diff --git a/src/gui/windows/registerdialog.cpp b/src/gui/windows/registerdialog.cpp
index 0f19e572e..1551ec449 100644
--- a/src/gui/windows/registerdialog.cpp
+++ b/src/gui/windows/registerdialog.cpp
@@ -54,7 +54,8 @@ RegisterDialog::RegisterDialog(LoginData &data) :
ActionListener(),
KeyListener(),
mLoginData(&data),
- mUserField(new TextField(this, mLoginData->username)),
+ mUserField(new TextField(this, mLoginData->username, LoseFocusOnTab_true,
+ nullptr, std::string(), false)),
mPasswordField(new PasswordField(this, mLoginData->password)),
mConfirmField(new PasswordField(this, std::string())),
mEmailField(nullptr),
@@ -103,7 +104,12 @@ RegisterDialog::RegisterDialog(LoginData &data) :
{
// TRANSLATORS: register dialog. label.
Label *const emailLabel = new Label(this, _("Email:"));
- mEmailField = new TextField(this);
+ mEmailField = new TextField(this,
+ std::string(),
+ LoseFocusOnTab_true,
+ nullptr,
+ std::string(),
+ false);
placer(0, row, emailLabel, 1, 1);
placer(1, row, mEmailField, 3, 1).setPadding(2);
mEmailField->addKeyListener(this);
diff --git a/src/gui/windows/textcommandeditor.cpp b/src/gui/windows/textcommandeditor.cpp
index 62ffc36f8..1e6407a85 100644
--- a/src/gui/windows/textcommandeditor.cpp
+++ b/src/gui/windows/textcommandeditor.cpp
@@ -68,13 +68,16 @@ TextCommandEditor::TextCommandEditor(TextCommand *const command) :
#endif // TMWA_SUPPORT
// TRANSLATORS: command editor label
mSymbolLabel(new Label(this, _("Symbol:"))),
- mSymbolTextField(new TextField(this)),
+ mSymbolTextField(new TextField(this, std::string(),
+ LoseFocusOnTab_true, nullptr, std::string(), false)),
// TRANSLATORS: command editor label
mCommandLabel(new Label(this, _("Command:"))),
- mCommandTextField(new TextField(this)),
+ mCommandTextField(new TextField(this, std::string(),
+ LoseFocusOnTab_true, nullptr, std::string(), false)),
// TRANSLATORS: command editor label
mCommentLabel(new Label(this, _("Comment:"))),
- mCommentTextField(new TextField(this)),
+ mCommentTextField(new TextField(this, std::string(),
+ LoseFocusOnTab_true, nullptr, std::string(), false)),
mTargetTypeModel(new TargetTypeModel),
// TRANSLATORS: command editor label
mTypeLabel(new Label(this, _("Target Type:"))),
diff --git a/src/gui/windows/textdialog.cpp b/src/gui/windows/textdialog.cpp
index d73c056d0..405e4667c 100644
--- a/src/gui/windows/textdialog.cpp
+++ b/src/gui/windows/textdialog.cpp
@@ -67,7 +67,12 @@ TextDialog::TextDialog(const std::string &restrict title,
}
else
{
- mTextField = new TextField(this);
+ mTextField = new TextField(this,
+ std::string(),
+ LoseFocusOnTab_true,
+ nullptr,
+ std::string(),
+ false);
place(0, 1, mTextField, 4, 1);
}
place(2, 2, mOkButton, 1, 1);
diff --git a/src/gui/windows/tradewindow.cpp b/src/gui/windows/tradewindow.cpp
index 8b730218c..b264fc7fc 100644
--- a/src/gui/windows/tradewindow.cpp
+++ b/src/gui/windows/tradewindow.cpp
@@ -90,7 +90,8 @@ TradeWindow::TradeWindow() :
mOkButton(new Button(this, "", "", this)), // Will be filled in later
// TRANSLATORS: trade window money change button
mMoneyChangeButton(new Button(this, _("Change"), "money", this)),
- mMoneyField(new TextField(this)),
+ mMoneyField(new TextField(this, std::string(),
+ LoseFocusOnTab_true, nullptr, std::string(), false)),
mAutoAddItem(nullptr),
mAutoAddToNick(""),
mGotMoney(0),