summaryrefslogtreecommitdiff
path: root/src/gui/windows
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/windows')
-rw-r--r--src/gui/windows/bankwindow.cpp6
-rw-r--r--src/gui/windows/buydialog.cpp21
-rw-r--r--src/gui/windows/buyselldialog.cpp6
-rw-r--r--src/gui/windows/changeemaildialog.cpp4
-rw-r--r--src/gui/windows/changepassworddialog.cpp4
-rw-r--r--src/gui/windows/charcreatedialog.cpp80
-rw-r--r--src/gui/windows/charselectdialog.cpp15
-rw-r--r--src/gui/windows/chatwindow.cpp2
-rw-r--r--src/gui/windows/confirmdialog.cpp18
-rw-r--r--src/gui/windows/connectiondialog.cpp7
-rw-r--r--src/gui/windows/didyouknowwindow.cpp12
-rw-r--r--src/gui/windows/editdialog.cpp8
-rw-r--r--src/gui/windows/editserverdialog.cpp9
-rw-r--r--src/gui/windows/equipmentwindow.cpp2
-rw-r--r--src/gui/windows/helpwindow.cpp3
-rw-r--r--src/gui/windows/inventorywindow.cpp96
-rw-r--r--src/gui/windows/itemamountwindow.cpp54
-rw-r--r--src/gui/windows/killstats.cpp6
-rw-r--r--src/gui/windows/logindialog.cpp9
-rw-r--r--src/gui/windows/maileditwindow.cpp6
-rw-r--r--src/gui/windows/mailviewwindow.cpp16
-rw-r--r--src/gui/windows/mailwindow.cpp11
-rw-r--r--src/gui/windows/npcdialog.cpp17
-rw-r--r--src/gui/windows/okdialog.cpp6
-rw-r--r--src/gui/windows/outfitwindow.cpp6
-rw-r--r--src/gui/windows/pincodedialog.cpp10
-rw-r--r--src/gui/windows/questswindow.cpp2
-rw-r--r--src/gui/windows/quitdialog.cpp4
-rw-r--r--src/gui/windows/registerdialog.cpp6
-rw-r--r--src/gui/windows/serverdialog.cpp16
-rw-r--r--src/gui/windows/setupwindow.cpp6
-rw-r--r--src/gui/windows/shopwindow.cpp30
-rw-r--r--src/gui/windows/shortcutwindow.cpp2
-rw-r--r--src/gui/windows/skilldialog.cpp4
-rw-r--r--src/gui/windows/socialwindow.cpp2
-rw-r--r--src/gui/windows/statuswindow.cpp2
-rw-r--r--src/gui/windows/textcommandeditor.cpp6
-rw-r--r--src/gui/windows/textdialog.cpp10
-rw-r--r--src/gui/windows/textselectdialog.cpp9
-rw-r--r--src/gui/windows/tradewindow.cpp8
-rw-r--r--src/gui/windows/updaterwindow.cpp4
-rw-r--r--src/gui/windows/whoisonline.cpp2
-rw-r--r--src/gui/windows/worldselectdialog.cpp6
43 files changed, 373 insertions, 180 deletions
diff --git a/src/gui/windows/bankwindow.cpp b/src/gui/windows/bankwindow.cpp
index bd5d19ab0..634be5fa9 100644
--- a/src/gui/windows/bankwindow.cpp
+++ b/src/gui/windows/bankwindow.cpp
@@ -49,9 +49,11 @@ BankWindow::BankWindow() :
mInputMoneyTextField(new IntTextField(this, 0, 0, 2147483647,
Enable_true, 0)),
// TRANSLATORS: bank window button
- mWithdrawButton(new Button(this, _("Withdraw"), "withdraw", this)),
+ mWithdrawButton(new Button(this, _("Withdraw"), "withdraw",
+ BUTTON_SKIN, this)),
// TRANSLATORS: bank window button
- mDepositButton(new Button(this, _("Deposit"), "deposit", this))
+ mDepositButton(new Button(this, _("Deposit"), "deposit",
+ BUTTON_SKIN, this))
{
setWindowName("Bank");
setCloseButton(true);
diff --git a/src/gui/windows/buydialog.cpp b/src/gui/windows/buydialog.cpp
index ea0946799..19c369053 100644
--- a/src/gui/windows/buydialog.cpp
+++ b/src/gui/windows/buydialog.cpp
@@ -329,17 +329,24 @@ void BuyDialog::init()
// TRANSLATORS: This is a narrow symbol used to denote 'increasing'.
// You may change this symbol if your language uses another.
- mIncreaseButton = new Button(this, _("+"), "inc", this);
+ mIncreaseButton = new Button(this, _("+"), "inc", BUTTON_SKIN, this);
// TRANSLATORS: This is a narrow symbol used to denote 'decreasing'.
// You may change this symbol if your language uses another.
- mDecreaseButton = new Button(this, _("-"), "dec", this);
+ mDecreaseButton = new Button(this, _("-"), "dec", BUTTON_SKIN, this);
mBuyButton = new Button(this, mNpcId == fromInt(Items, BeingId)
// TRANSLATORS: buy dialog button
- ? _("Create") : (mAdvanced ? _("Add") : _("Buy")), "buy", this);
+ ? _("Create") : (mAdvanced ? _("Add") : _("Buy")),
+ "buy",
+ BUTTON_SKIN,
+ this);
if (mAdvanced)
{
- // TRANSLATORS: buy dialog button
- mConfirmButton = new Button(this, _("Buy"), "confirm", this);
+ mConfirmButton = new Button(this,
+ // TRANSLATORS: buy dialog button
+ _("Buy"),
+ "confirm",
+ BUTTON_SKIN,
+ this);
mConfirmButton->setEnabled(false);
}
else
@@ -347,9 +354,9 @@ void BuyDialog::init()
mConfirmButton = nullptr;
}
// TRANSLATORS: buy dialog button
- mQuitButton = new Button(this, _("Quit"), "quit", this);
+ mQuitButton = new Button(this, _("Quit"), "quit", BUTTON_SKIN, this);
// TRANSLATORS: buy dialog button
- mAddMaxButton = new Button(this, _("Max"), "max", this);
+ mAddMaxButton = new Button(this, _("Max"), "max", BUTTON_SKIN, this);
mDecreaseButton->adjustSize();
mDecreaseButton->setWidth(mIncreaseButton->getWidth());
diff --git a/src/gui/windows/buyselldialog.cpp b/src/gui/windows/buyselldialog.cpp
index 9347c5d5a..fa33ea73b 100644
--- a/src/gui/windows/buyselldialog.cpp
+++ b/src/gui/windows/buyselldialog.cpp
@@ -86,7 +86,11 @@ void BuySellDialog::init()
*curBtn != nullptr;
curBtn++)
{
- Button *const btn = new Button(this, gettext(*curBtn), *curBtn, this);
+ Button *const btn = new Button(this,
+ gettext(*curBtn),
+ *curBtn,
+ BUTTON_SKIN,
+ this);
if (mBuyButton == nullptr)
mBuyButton = btn; // For focus request
btn->setPosition(x, y);
diff --git a/src/gui/windows/changeemaildialog.cpp b/src/gui/windows/changeemaildialog.cpp
index 360a7ce7b..5cd03a887 100644
--- a/src/gui/windows/changeemaildialog.cpp
+++ b/src/gui/windows/changeemaildialog.cpp
@@ -53,9 +53,9 @@ ChangeEmailDialog::ChangeEmailDialog(LoginData &data) :
nullptr, std::string(), false)),
// TRANSLATORS: button in change email dialog
mChangeEmailButton(new Button(this, _("Change Email Address"),
- "change_email", this)),
+ "change_email", BUTTON_SKIN, this)),
// TRANSLATORS: button in change email dialog
- mCancelButton(new Button(this, _("Cancel"), "cancel", this)),
+ mCancelButton(new Button(this, _("Cancel"), "cancel", BUTTON_SKIN, this)),
mWrongDataNoticeListener(new WrongDataNoticeListener),
mLoginData(&data)
{
diff --git a/src/gui/windows/changepassworddialog.cpp b/src/gui/windows/changepassworddialog.cpp
index 9fac2a602..d302244ba 100644
--- a/src/gui/windows/changepassworddialog.cpp
+++ b/src/gui/windows/changepassworddialog.cpp
@@ -53,9 +53,9 @@ ChangePasswordDialog::ChangePasswordDialog(LoginData &data) :
mSecondPassField(new PasswordField(this, std::string())),
// TRANSLATORS: change password dialog button
mChangePassButton(new Button(this, _("Change Password"),
- "change_password", this)),
+ "change_password", BUTTON_SKIN, this)),
// TRANSLATORS: change password dialog button
- mCancelButton(new Button(this, _("Cancel"), "cancel", this)),
+ mCancelButton(new Button(this, _("Cancel"), "cancel", BUTTON_SKIN, this)),
mWrongDataNoticeListener(new WrongDataNoticeListener),
mLoginData(&data)
{
diff --git a/src/gui/windows/charcreatedialog.cpp b/src/gui/windows/charcreatedialog.cpp
index caac21591..f3ff5ca32 100644
--- a/src/gui/windows/charcreatedialog.cpp
+++ b/src/gui/windows/charcreatedialog.cpp
@@ -100,9 +100,9 @@ CharCreateDialog::CharCreateDialog(CharSelectDialog *const parent,
mLookLabel(nullptr),
mLookNameLabel(nullptr),
// TRANSLATORS: char create dialog button
- mActionButton(new Button(this, _("^"), "action", this)),
+ mActionButton(new Button(this, _("^"), "action", BUTTON_SKIN, this)),
// TRANSLATORS: char create dialog button
- mRotateButton(new Button(this, _(">"), "rotate", this)),
+ mRotateButton(new Button(this, _(">"), "rotate", BUTTON_SKIN, this)),
mAttributeSlider(),
mAttributeLabel(),
mAttributeValue(),
@@ -110,9 +110,9 @@ CharCreateDialog::CharCreateDialog(CharSelectDialog *const parent,
// TRANSLATORS: char create dialog label
strprintf(_("Please distribute %d points"), 99))),
// TRANSLATORS: char create dialog button
- mCreateButton(new Button(this, _("Create"), "create", this)),
+ mCreateButton(new Button(this, _("Create"), "create", BUTTON_SKIN, this)),
// TRANSLATORS: char create dialog button
- mCancelButton(new Button(this, _("Cancel"), "cancel", this)),
+ mCancelButton(new Button(this, _("Cancel"), "cancel", BUTTON_SKIN, this)),
mPlayer(Being::createBeing(BeingId_zero,
ActorType::Player,
BeingTypeId_zero,
@@ -191,14 +191,22 @@ CharCreateDialog::CharCreateDialog(CharSelectDialog *const parent,
if (maxHairColor > minHairColor)
{
- // TRANSLATORS: This is a narrow symbol used to denote 'next'.
- // You may change this symbol if your language uses another.
- // TRANSLATORS: char create dialog button
- mNextHairColorButton = new Button(this, _(">"), "nextcolor", this);
- // TRANSLATORS: This is a narrow symbol used to denote 'previous'.
- // You may change this symbol if your language uses another.
- // TRANSLATORS: char create dialog button
- mPrevHairColorButton = new Button(this, _("<"), "prevcolor", this);
+ mNextHairColorButton = new Button(this,
+ // TRANSLATORS: This is a narrow symbol used to denote 'next'.
+ // You may change this symbol if your language uses another.
+ // TRANSLATORS: char create dialog button
+ _(">"),
+ "nextcolor",
+ BUTTON_SKIN,
+ this);
+ mPrevHairColorButton = new Button(this,
+ // TRANSLATORS: This is a narrow symbol used to denote 'previous'.
+ // You may change this symbol if your language uses another.
+ // TRANSLATORS: char create dialog button
+ _("<"),
+ "prevcolor",
+ BUTTON_SKIN,
+ this);
// TRANSLATORS: char create dialog label
mHairColorLabel = new Label(this, _("Hair color:"));
mHairColorNameLabel = new Label(this, "");
@@ -206,10 +214,18 @@ CharCreateDialog::CharCreateDialog(CharSelectDialog *const parent,
if (maxHairStyle > minHairStyle)
{
- // TRANSLATORS: char create dialog button
- mNextHairStyleButton = new Button(this, _(">"), "nextstyle", this);
- // TRANSLATORS: char create dialog button
- mPrevHairStyleButton = new Button(this, _("<"), "prevstyle", this);
+ mNextHairStyleButton = new Button(this,
+ // TRANSLATORS: char create dialog button
+ _(">"),
+ "nextstyle",
+ BUTTON_SKIN,
+ this);
+ mPrevHairStyleButton = new Button(this,
+ // TRANSLATORS: char create dialog button
+ _("<"),
+ "prevstyle",
+ BUTTON_SKIN,
+ this);
// TRANSLATORS: char create dialog label
mHairStyleLabel = new Label(this, _("Hair style:"));
mHairStyleNameLabel = new Label(this, "");
@@ -217,20 +233,36 @@ CharCreateDialog::CharCreateDialog(CharSelectDialog *const parent,
if (serverFeatures->haveRaceSelection() && mMinRace < mMaxRace)
{
- // TRANSLATORS: char create dialog button
- mNextRaceButton = new Button(this, _(">"), "nextrace", this);
- // TRANSLATORS: char create dialog button
- mPrevRaceButton = new Button(this, _("<"), "prevrace", this);
+ mNextRaceButton = new Button(this,
+ // TRANSLATORS: char create dialog button
+ _(">"),
+ "nextrace",
+ BUTTON_SKIN,
+ this);
+ mPrevRaceButton = new Button(this,
+ // TRANSLATORS: char create dialog button
+ _("<"),
+ "prevrace",
+ BUTTON_SKIN,
+ this);
// TRANSLATORS: char create dialog label
mRaceLabel = new Label(this, _("Race:"));
mRaceNameLabel = new Label(this, "");
}
if (serverFeatures->haveLookSelection() && mMinLook < mMaxLook)
{
- // TRANSLATORS: char create dialog button
- mNextLookButton = new Button(this, _(">"), "nextlook", this);
- // TRANSLATORS: char create dialog button
- mPrevLookButton = new Button(this, _("<"), "prevlook", this);
+ mNextLookButton = new Button(this,
+ // TRANSLATORS: char create dialog button
+ _(">"),
+ "nextlook",
+ BUTTON_SKIN,
+ this);
+ mPrevLookButton = new Button(this,
+ // TRANSLATORS: char create dialog button
+ _("<"),
+ "prevlook",
+ BUTTON_SKIN,
+ this);
// TRANSLATORS: char create dialog label
mLookLabel = new Label(this, _("Look:"));
mLookNameLabel = new Label(this, "");
diff --git a/src/gui/windows/charselectdialog.cpp b/src/gui/windows/charselectdialog.cpp
index 638e5caa0..5f99a16fc 100644
--- a/src/gui/windows/charselectdialog.cpp
+++ b/src/gui/windows/charselectdialog.cpp
@@ -70,16 +70,17 @@ CharSelectDialog::CharSelectDialog(LoginData &data) :
KeyListener(),
mLoginData(&data),
// TRANSLATORS: char select dialog. button.
- mSwitchLoginButton(new Button(this, _("Switch"), "switch", this)),
+ mSwitchLoginButton(new Button(this, _("Switch"), "switch",
+ BUTTON_SKIN, this)),
// TRANSLATORS: char select dialog. button.
- mChangePasswordButton(new Button(this, _("Password"),
- "change_password", this)),
+ mChangePasswordButton(new Button(this, _("Password"), "change_password",
+ BUTTON_SKIN, this)),
// TRANSLATORS: char select dialog. button.
- mPlayButton(new Button(this, _("Play"), "use", this)),
+ mPlayButton(new Button(this, _("Play"), "use", BUTTON_SKIN, this)),
// TRANSLATORS: char select dialog. button.
- mInfoButton(new Button(this, _("Info"), "info", this)),
+ mInfoButton(new Button(this, _("Info"), "info", BUTTON_SKIN, this)),
// TRANSLATORS: char select dialog. button.
- mDeleteButton(new Button(this, _("Delete"), "delete", this)),
+ mDeleteButton(new Button(this, _("Delete"), "delete", BUTTON_SKIN, this)),
// TRANSLATORS: char select dialog. button.
mRenameButton(nullptr),
mChangePinButton(nullptr),
@@ -113,6 +114,7 @@ CharSelectDialog::CharSelectDialog(LoginData &data) :
// TRANSLATORS: character rename button
_("Rename"),
"rename",
+ BUTTON_SKIN,
this);
placer(n, 0, mRenameButton, 1, 1);
n ++;
@@ -125,6 +127,7 @@ CharSelectDialog::CharSelectDialog(LoginData &data) :
// TRANSLATORS: change pincode button
_("Change pin"),
"changepin",
+ BUTTON_SKIN,
this);
placer(n, 0, mChangePinButton, 1, 1);
n ++;
diff --git a/src/gui/windows/chatwindow.cpp b/src/gui/windows/chatwindow.cpp
index f9ba143bd..9dd1ea4c3 100644
--- a/src/gui/windows/chatwindow.cpp
+++ b/src/gui/windows/chatwindow.cpp
@@ -110,7 +110,7 @@ ChatWindow::ChatWindow(const std::string &name) :
mColorListModel(new ColorListModel),
mColorPicker(new DropDown(this, mColorListModel,
false, Modal_false, nullptr, std::string())),
- mChatButton(new Button(this, ":)", "openemote", this)),
+ mChatButton(new Button(this, ":)", "openemote", BUTTON_SKIN, this)),
mAwayLog(),
mHighlights(),
mGlobalsFilter(),
diff --git a/src/gui/windows/confirmdialog.cpp b/src/gui/windows/confirmdialog.cpp
index 5bc485c9f..a77d3bece 100644
--- a/src/gui/windows/confirmdialog.cpp
+++ b/src/gui/windows/confirmdialog.cpp
@@ -53,13 +53,21 @@ ConfirmDialog::ConfirmDialog(const std::string &restrict title,
void ConfirmDialog::postInit()
{
Window::postInit();
- // TRANSLATORS: confirm dialog button
- Button *const yesButton = new Button(this, _("Yes"), "yes", this);
- // TRANSLATORS: confirm dialog button
- Button *const noButton = new Button(this, _("No"), "no", this);
+ Button *const yesButton = new Button(this,
+ // TRANSLATORS: confirm dialog button
+ _("Yes"),
+ "yes",
+ BUTTON_SKIN,
+ this);
+ Button *const noButton = new Button(this,
+ // TRANSLATORS: confirm dialog button
+ _("No"),
+ "no",
+ BUTTON_SKIN,
+ this);
Button *const ignoreButton = mIgnore ? new Button(
// TRANSLATORS: confirm dialog button
- this, _("Ignore"), "ignore", this) : nullptr;
+ this, _("Ignore"), "ignore", BUTTON_SKIN, this) : nullptr;
const int numRows = mTextBox->getNumberOfRows();
int inWidth = yesButton->getWidth() + noButton->getWidth() +
diff --git a/src/gui/windows/connectiondialog.cpp b/src/gui/windows/connectiondialog.cpp
index 9c8507709..cfdfe6650 100644
--- a/src/gui/windows/connectiondialog.cpp
+++ b/src/gui/windows/connectiondialog.cpp
@@ -47,9 +47,12 @@ ConnectionDialog::ConnectionDialog(const std::string &text,
ProgressIndicator *const progressIndicator = new ProgressIndicator(this);
Label *const label = new Label(this, text);
- Button *const cancelButton = new Button(
+ Button *const cancelButton = new Button(this,
// TRANSLATORS: connection dialog button
- this, _("Cancel"), "cancelButton", this);
+ _("Cancel"),
+ "cancelButton",
+ BUTTON_SKIN,
+ this);
place(0, 0, progressIndicator, 1, 1);
place(0, 1, label, 1, 1);
diff --git a/src/gui/windows/didyouknowwindow.cpp b/src/gui/windows/didyouknowwindow.cpp
index 47d231a68..1d53a9a9f 100644
--- a/src/gui/windows/didyouknowwindow.cpp
+++ b/src/gui/windows/didyouknowwindow.cpp
@@ -60,9 +60,9 @@ DidYouKnowWindow::DidYouKnowWindow() :
mScrollArea(new ScrollArea(this, mBrowserBox,
Opaque_true, "didyouknow_background.xml")),
// TRANSLATORS: did you know window button
- mButtonPrev(new Button(this, _("< Previous"), "prev", this)),
+ mButtonPrev(new Button(this, _("< Previous"), "prev", BUTTON_SKIN, this)),
// TRANSLATORS: did you know window button
- mButtonNext(new Button(this, _("Next >"), "next", this)),
+ mButtonNext(new Button(this, _("Next >"), "next", BUTTON_SKIN, this)),
// TRANSLATORS: did you know window checkbox
mOpenAgainCheckBox(new CheckBox(this, _("Auto open this window"),
config.getBoolValue("showDidYouKnow"), this, "openagain"))
@@ -80,8 +80,12 @@ DidYouKnowWindow::DidYouKnowWindow() :
setDefaultSize(500, 400, ImagePosition::CENTER, 0, 0);
mBrowserBox->setOpaque(Opaque_false);
- // TRANSLATORS: did you know window button
- Button *const okButton = new Button(this, _("Close"), "close", this);
+ Button *const okButton = new Button(this,
+ // TRANSLATORS: did you know window button
+ _("Close"),
+ "close",
+ BUTTON_SKIN,
+ this);
mBrowserBox->setLinkHandler(mItemLinkHandler);
if (gui != nullptr)
diff --git a/src/gui/windows/editdialog.cpp b/src/gui/windows/editdialog.cpp
index 1d5b7d95b..70b8e44eb 100644
--- a/src/gui/windows/editdialog.cpp
+++ b/src/gui/windows/editdialog.cpp
@@ -48,8 +48,12 @@ EditDialog::EditDialog(const std::string &restrict title,
void EditDialog::postInit()
{
Window::postInit();
- // TRANSLATORS: edit dialog label
- Button *const okButton = new Button(this, _("OK"), mEventOk, this);
+ Button *const okButton = new Button(this,
+ // TRANSLATORS: edit dialog label
+ _("OK"),
+ mEventOk,
+ BUTTON_SKIN,
+ this);
const int pad = getPadding();
const int pad2 = pad * 2;
diff --git a/src/gui/windows/editserverdialog.cpp b/src/gui/windows/editserverdialog.cpp
index 13bf7650b..c109282dc 100644
--- a/src/gui/windows/editserverdialog.cpp
+++ b/src/gui/windows/editserverdialog.cpp
@@ -60,14 +60,15 @@ EditServerDialog::EditServerDialog(ServerDialog *const parent,
mPacketVersionField(new IntTextField(this, 0, 0, maxPacketVersion,
Enable_true, 0)),
// TRANSLATORS: edit server dialog button
- mConnectButton(new Button(this, _("Connect"), "connect", this)),
+ mConnectButton(new Button(this, _("Connect"), "connect",
+ BUTTON_SKIN, this)),
// TRANSLATORS: edit server dialog button
- mOkButton(new Button(this, _("OK"), "addServer", this)),
+ mOkButton(new Button(this, _("OK"), "addServer", BUTTON_SKIN, this)),
// TRANSLATORS: edit server dialog button
- mCancelButton(new Button(this, _("Cancel"), "cancel", this)),
+ mCancelButton(new Button(this, _("Cancel"), "cancel", BUTTON_SKIN, this)),
// TRANSLATORS: edit server dialog label
mPersistentIp(new CheckBox(this, _("Use same ip"),
- true, this, "persistentIp")),
+ true, this, "persistentIp")),
mTypeListModel(new TypeListModel),
mTypeField(new DropDown(this, mTypeListModel,
false, Modal_true, nullptr, std::string())),
diff --git a/src/gui/windows/equipmentwindow.cpp b/src/gui/windows/equipmentwindow.cpp
index f9c6bc389..ed59cab7d 100644
--- a/src/gui/windows/equipmentwindow.cpp
+++ b/src/gui/windows/equipmentwindow.cpp
@@ -71,7 +71,7 @@ EquipmentWindow::EquipmentWindow(Equipment *const equipment,
"equipment_playerbox.xml",
"equipment_selectedplayerbox.xml")),
// TRANSLATORS: equipment window button
- mUnequip(new Button(this, _("Unequip"), "unequip", this)),
+ mUnequip(new Button(this, _("Unequip"), "unequip", BUTTON_SKIN, this)),
mImageSet(nullptr),
mBeing(being),
mSlotBackground(),
diff --git a/src/gui/windows/helpwindow.cpp b/src/gui/windows/helpwindow.cpp
index 945e0c3e0..115abe56f 100644
--- a/src/gui/windows/helpwindow.cpp
+++ b/src/gui/windows/helpwindow.cpp
@@ -58,7 +58,8 @@ HelpWindow::HelpWindow() :
LinkHandler(),
ActionListener(),
// TRANSLATORS: help window. button.
- mDYKButton(new Button(this, _("Did you know..."), "DYK", this)),
+ mDYKButton(new Button(this, _("Did you know..."), "DYK",
+ BUTTON_SKIN, this)),
mBrowserBox(new StaticBrowserBox(this, Opaque_true,
"browserbox.xml")),
mScrollArea(new ScrollArea(this, mBrowserBox,
diff --git a/src/gui/windows/inventorywindow.cpp b/src/gui/windows/inventorywindow.cpp
index b066b50a8..f198743ec 100644
--- a/src/gui/windows/inventorywindow.cpp
+++ b/src/gui/windows/inventorywindow.cpp
@@ -220,17 +220,41 @@ InventoryWindow::InventoryWindow(Inventory *const inventory) :
longestUseString = unequip;
}
- mUseButton = new Button(this, longestUseString, "use", this);
- // TRANSLATORS: inventory button
- mDropButton = new Button(this, _("Drop..."), "drop", this);
- // TRANSLATORS: inventory outfits button
- mOutfitButton = new Button(this, _("O"), "outfit", this);
- // TRANSLATORS: inventory cart button
- mCartButton = new Button(this, _("C"), "cart", this);
- // TRANSLATORS: inventory shop button
- mShopButton = new Button(this, _("S"), "shop", this);
- // TRANSLATORS: inventory equipment button
- mEquipmentButton = new Button(this, _("E"), "equipment", this);
+ mUseButton = new Button(this,
+ longestUseString,
+ "use",
+ BUTTON_SKIN,
+ this);
+ mDropButton = new Button(this,
+ // TRANSLATORS: inventory button
+ _("Drop..."),
+ "drop",
+ BUTTON_SKIN,
+ this);
+ mOutfitButton = new Button(this,
+ // TRANSLATORS: inventory outfits button
+ _("O"),
+ "outfit",
+ BUTTON_SKIN,
+ this);
+ mCartButton = new Button(this,
+ // TRANSLATORS: inventory cart button
+ _("C"),
+ "cart",
+ BUTTON_SKIN,
+ this);
+ mShopButton = new Button(this,
+ // TRANSLATORS: inventory shop button
+ _("S"),
+ "shop",
+ BUTTON_SKIN,
+ this);
+ mEquipmentButton = new Button(this,
+ // TRANSLATORS: inventory equipment button
+ _("E"),
+ "equipment",
+ BUTTON_SKIN,
+ this);
mWeightBar = new ProgressBar(this, 0.0F, 100, 0,
ProgressColorId::PROG_WEIGHT,
"weightprogressbar.xml", "weightprogressbar_fill.xml");
@@ -268,13 +292,24 @@ InventoryWindow::InventoryWindow(Inventory *const inventory) :
case InventoryType::Storage:
{
- // TRANSLATORS: storage button
- mStoreButton = new Button(this, _("Store"), "store", this);
- // TRANSLATORS: storage button
- mRetrieveButton = new Button(this, _("Retrieve"),
- "retrieve", this);
- // TRANSLATORS: storage button
- mInvCloseButton = new Button(this, _("Close"), "close", this);
+ mStoreButton = new Button(this,
+ // TRANSLATORS: storage button
+ _("Store"),
+ "store",
+ BUTTON_SKIN,
+ this);
+ mRetrieveButton = new Button(this,
+ // TRANSLATORS: storage button
+ _("Retrieve"),
+ "retrieve",
+ BUTTON_SKIN,
+ this);
+ mInvCloseButton = new Button(this,
+ // TRANSLATORS: storage button
+ _("Close"),
+ "close",
+ BUTTON_SKIN,
+ this);
mSlotsBarCell = &place(0, 0, mSlotsBar, 6, 1);
mSortDropDownCell = &place(6, 0, mSortDropDown, 1, 1);
@@ -291,13 +326,24 @@ InventoryWindow::InventoryWindow(Inventory *const inventory) :
case InventoryType::Cart:
{
- // TRANSLATORS: storage button
- mStoreButton = new Button(this, _("Store"), "store", this);
- // TRANSLATORS: storage button
- mRetrieveButton = new Button(this, _("Retrieve"),
- "retrieve", this);
- // TRANSLATORS: storage button
- mInvCloseButton = new Button(this, _("Close"), "close", this);
+ mStoreButton = new Button(this,
+ // TRANSLATORS: storage button
+ _("Store"),
+ "store",
+ BUTTON_SKIN,
+ this);
+ mRetrieveButton = new Button(this,
+ // TRANSLATORS: storage button
+ _("Retrieve"),
+ "retrieve",
+ BUTTON_SKIN,
+ this);
+ mInvCloseButton = new Button(this,
+ // TRANSLATORS: storage button
+ _("Close"),
+ "close",
+ BUTTON_SKIN,
+ this);
mWeightBar = new ProgressBar(this, 0.0F, 100, 0,
ProgressColorId::PROG_WEIGHT,
diff --git a/src/gui/windows/itemamountwindow.cpp b/src/gui/windows/itemamountwindow.cpp
index 86a025800..c30a91780 100644
--- a/src/gui/windows/itemamountwindow.cpp
+++ b/src/gui/windows/itemamountwindow.cpp
@@ -198,16 +198,36 @@ ItemAmountWindow::ItemAmountWindow(const ItemAmountWindowUsageT usage,
}
// Buttons
- // TRANSLATORS: item amount window button
- Button *const minusAmountButton = new Button(this, _("-"), "dec", this);
- // TRANSLATORS: item amount window button
- Button *const plusAmountButton = new Button(this, _("+"), "inc", this);
- // TRANSLATORS: item amount window button
- Button *const okButton = new Button(this, _("OK"), "ok", this);
- // TRANSLATORS: item amount window button
- Button *const cancelButton = new Button(this, _("Cancel"), "cancel", this);
- // TRANSLATORS: item amount window button
- Button *const addAllButton = new Button(this, _("All"), "all", this);
+ Button *const minusAmountButton = new Button(this,
+ // TRANSLATORS: item amount window button
+ _("-"),
+ "dec",
+ BUTTON_SKIN,
+ this);
+ Button *const plusAmountButton = new Button(this,
+ // TRANSLATORS: item amount window button
+ _("+"),
+ "inc",
+ BUTTON_SKIN,
+ this);
+ Button *const okButton = new Button(this,
+ // TRANSLATORS: item amount window button
+ _("OK"),
+ "ok",
+ BUTTON_SKIN,
+ this);
+ Button *const cancelButton = new Button(this,
+ // TRANSLATORS: item amount window button
+ _("Cancel"),
+ "cancel",
+ BUTTON_SKIN,
+ this);
+ Button *const addAllButton = new Button(this,
+ // TRANSLATORS: item amount window button
+ _("All"),
+ "all",
+ BUTTON_SKIN,
+ this);
minusAmountButton->adjustSize();
minusAmountButton->setWidth(plusAmountButton->getWidth());
@@ -232,12 +252,18 @@ ItemAmountWindow::ItemAmountWindow(const ItemAmountWindowUsageT usage,
if (mUsage == ItemAmountWindowUsage::ShopBuyAdd ||
mUsage == ItemAmountWindowUsage::ShopSellAdd)
{
- Button *const minusPriceButton = new Button(
+ Button *const minusPriceButton = new Button(this,
// TRANSLATORS: item amount window button
- this, _("-"), "decPrice", this);
- Button *const plusPriceButton = new Button(
+ _("-"),
+ "decPrice",
+ BUTTON_SKIN,
+ this);
+ Button *const plusPriceButton = new Button(this,
// TRANSLATORS: item amount window button
- this, _("+"), "incPrice", this);
+ _("+"),
+ "incPrice",
+ BUTTON_SKIN,
+ this);
minusPriceButton->adjustSize();
minusPriceButton->setWidth(plusPriceButton->getWidth());
diff --git a/src/gui/windows/killstats.cpp b/src/gui/windows/killstats.cpp
index 9e65cd7ea..bcedd8fab 100644
--- a/src/gui/windows/killstats.cpp
+++ b/src/gui/windows/killstats.cpp
@@ -51,9 +51,11 @@ KillStats::KillStats() :
AttributeListener(),
mKillTimer(0),
// TRANSLATORS: kill stats window button
- mResetButton(new Button(this, _("Reset stats"), "reset", this)),
+ mResetButton(new Button(this, _("Reset stats"), "reset",
+ BUTTON_SKIN, this)),
// TRANSLATORS: kill stats window button
- mTimerButton(new Button(this, _("Reset timer"), "timer", this)),
+ mTimerButton(new Button(this, _("Reset timer"), "timer",
+ BUTTON_SKIN, this)),
mLine1(nullptr),
mLine2(nullptr),
mLine3(nullptr),
diff --git a/src/gui/windows/logindialog.cpp b/src/gui/windows/logindialog.cpp
index ec895cf7f..53a50d4d5 100644
--- a/src/gui/windows/logindialog.cpp
+++ b/src/gui/windows/logindialog.cpp
@@ -83,11 +83,14 @@ LoginDialog::LoginDialog(LoginData &data,
mUpdateTypeDropDown(new DropDown(this, mUpdateTypeModel,
false, Modal_false, nullptr, std::string())),
// TRANSLATORS: login dialog button
- mServerButton(new Button(this, _("Change Server"), "server", this)),
+ mServerButton(new Button(this, _("Change Server"), "server",
+ BUTTON_SKIN, this)),
// TRANSLATORS: login dialog button
- mLoginButton(new Button(this, _("Login"), "login", this)),
+ mLoginButton(new Button(this, _("Login"), "login",
+ BUTTON_SKIN, this)),
// TRANSLATORS: login dialog button
- mRegisterButton(new Button(this, _("Register"), "register", this)),
+ mRegisterButton(new Button(this, _("Register"), "register",
+ BUTTON_SKIN, this)),
// TRANSLATORS: login dialog checkbox
mCustomUpdateHost(new CheckBox(this, _("Custom update host"),
(mLoginData->updateType & UpdateType::Custom) != 0,
diff --git a/src/gui/windows/maileditwindow.cpp b/src/gui/windows/maileditwindow.cpp
index 70f69a0ef..c241d97f8 100644
--- a/src/gui/windows/maileditwindow.cpp
+++ b/src/gui/windows/maileditwindow.cpp
@@ -54,11 +54,11 @@ MailEditWindow::MailEditWindow() :
ActionListener(),
FocusListener(),
// TRANSLATORS: mail edit window button
- mSendButton(new Button(this, _("Send"), "send", this)),
+ mSendButton(new Button(this, _("Send"), "send", BUTTON_SKIN, this)),
// TRANSLATORS: mail edit window button
- mCloseButton(new Button(this, _("Close"), "close", this)),
+ mCloseButton(new Button(this, _("Close"), "close", BUTTON_SKIN, this)),
// TRANSLATORS: mail edit window button
- mAddButton(new Button(this, _("Add"), "add", this)),
+ mAddButton(new Button(this, _("Add"), "add", BUTTON_SKIN, this)),
// TRANSLATORS: mail edit window label
mToLabel(new Label(this, _("To:"))),
// TRANSLATORS: mail edit window label
diff --git a/src/gui/windows/mailviewwindow.cpp b/src/gui/windows/mailviewwindow.cpp
index f8f508dc1..f81921f4a 100644
--- a/src/gui/windows/mailviewwindow.cpp
+++ b/src/gui/windows/mailviewwindow.cpp
@@ -55,14 +55,16 @@ MailViewWindow::MailViewWindow(MailMessage *const message,
mGetAttachButton(new Button(this,
// TRANSLATORS: mail view attach / items button
settings.enableNewMailSystem ? _("Get items") : _("Get attach"),
- "attach", this)),
+ "attach",
+ BUTTON_SKIN,
+ this)),
mGetMoneyButton(nullptr),
// TRANSLATORS: mail view window button
- mCloseButton(new Button(this, _("Close"), "close", this)),
- mPrevButton(new Button(this, "<", "prev", this)),
- mNextButton(new Button(this, ">", "next", this)),
+ mCloseButton(new Button(this, _("Close"), "close", BUTTON_SKIN, this)),
+ mPrevButton(new Button(this, "<", "prev", BUTTON_SKIN, this)),
+ mNextButton(new Button(this, ">", "next", BUTTON_SKIN, this)),
// TRANSLATORS: mail view window button
- mReplyButton(new Button(this, _("Reply"), "reply", this)),
+ mReplyButton(new Button(this, _("Reply"), "reply", BUTTON_SKIN, this)),
// TRANSLATORS: mail view window label
mTimeLabel(new Label(this, strprintf("%s %s", _("Time:"),
message->strTime.c_str()))),
@@ -122,7 +124,9 @@ MailViewWindow::MailViewWindow(MailMessage *const message,
mGetMoneyButton = new Button(this,
// TRANSLATORS: mail view attached money button
_("Get money"),
- "money", this);
+ "money",
+ BUTTON_SKIN,
+ this);
placer(0, n++, mGetMoneyButton, 1, 1);
}
placer(0, n++, mGetAttachButton, 1, 1);
diff --git a/src/gui/windows/mailwindow.cpp b/src/gui/windows/mailwindow.cpp
index 4d1f0ee59..cacd9af43 100644
--- a/src/gui/windows/mailwindow.cpp
+++ b/src/gui/windows/mailwindow.cpp
@@ -65,17 +65,18 @@ MailWindow::MailWindow() :
fromBool(getOptionBool("showlistbackground", false), Opaque),
"mail_listbackground.xml")),
// TRANSLATORS: mail window button
- mRefreshButton(new Button(this, _("Refresh"), "refresh", this)),
+ mRefreshButton(new Button(this, _("Refresh"), "refresh",
+ BUTTON_SKIN, this)),
// TRANSLATORS: mail window button
- mNewButton(new Button(this, _("New"), "new", this)),
+ mNewButton(new Button(this, _("New"), "new", BUTTON_SKIN, this)),
// TRANSLATORS: mail window button
- mDeleteButton(new Button(this, _("Delete"), "delete", this)),
+ mDeleteButton(new Button(this, _("Delete"), "delete", BUTTON_SKIN, this)),
mReturnButton(new Button(this,
// TRANSLATORS: mail window button
settings.enableNewMailSystem ? _("Get old") : _("Return"),
- "return", this)),
+ "return", BUTTON_SKIN, this)),
// TRANSLATORS: mail window button
- mOpenButton(new Button(this, _("Open"), "open", this)),
+ mOpenButton(new Button(this, _("Open"), "open", BUTTON_SKIN, this)),
mOpenType(MailOpenType::Mail),
mUseMail2(settings.enableNewMailSystem),
mLastPage(false)
diff --git a/src/gui/windows/npcdialog.cpp b/src/gui/windows/npcdialog.cpp
index 74c86211c..0abce52ca 100644
--- a/src/gui/windows/npcdialog.cpp
+++ b/src/gui/windows/npcdialog.cpp
@@ -124,18 +124,18 @@ NpcDialog::NpcDialog(const BeingId npcId) :
nullptr, std::string(), false)),
mIntField(new IntTextField(this, 0, 0, 0, Enable_true, 0)),
// TRANSLATORS: npc dialog button
- mPlusButton(new Button(this, _("+"), "inc", this)),
+ mPlusButton(new Button(this, _("+"), "inc", BUTTON_SKIN, this)),
// TRANSLATORS: npc dialog button
- mMinusButton(new Button(this, _("-"), "dec", this)),
+ mMinusButton(new Button(this, _("-"), "dec", BUTTON_SKIN, this)),
// TRANSLATORS: npc dialog button
- mClearButton(new Button(this, _("Clear"), "clear", this)),
- mButton(new Button(this, "", "ok", this)),
+ mClearButton(new Button(this, _("Clear"), "clear", BUTTON_SKIN, this)),
+ mButton(new Button(this, "", "ok", BUTTON_SKIN, this)),
// TRANSLATORS: npc dialog button
- mButton2(new Button(this, _("Close"), "close", this)),
+ mButton2(new Button(this, _("Close"), "close", BUTTON_SKIN, this)),
// TRANSLATORS: npc dialog button
- mButton3(new Button(this, _("Add"), "add", this)),
+ mButton3(new Button(this, _("Add"), "add", BUTTON_SKIN, this)),
// TRANSLATORS: npc dialog button
- mResetButton(new Button(this, _("Reset"), "reset", this)),
+ mResetButton(new Button(this, _("Reset"), "reset", BUTTON_SKIN, this)),
mInventory(new Inventory(InventoryType::Npc, 1)),
mComplexInventory(new ComplexInventory(InventoryType::Craft, 1)),
mItemContainer(new ItemContainer(this, mInventory,
@@ -1323,7 +1323,8 @@ void NpcDialog::createSkinControls()
mDialogInfo->menu.buttons)
{
const NpcButtonInfo *const info = *it;
- Button *const button = new Button(this);
+ Button *const button = new Button(this,
+ BUTTON_SKIN);
button->setCaption(info->name);
button->setActionEventId("skin_" + info->value);
button->addActionListener(this);
diff --git a/src/gui/windows/okdialog.cpp b/src/gui/windows/okdialog.cpp
index ab6b269d4..8a11785c5 100644
--- a/src/gui/windows/okdialog.cpp
+++ b/src/gui/windows/okdialog.cpp
@@ -50,7 +50,11 @@ OkDialog::OkDialog(const std::string &restrict title,
mTextBox->setTextWrapped(msg, minWidth);
// TRANSLATORS: ok dialog button
- Button *const okButton = new Button(this, button, "ok", this);
+ Button *const okButton = new Button(this,
+ button,
+ "ok",
+ BUTTON_SKIN,
+ this);
int width = getFont()->getWidth(title);
if (width < mTextBox->getMinWidth())
diff --git a/src/gui/windows/outfitwindow.cpp b/src/gui/windows/outfitwindow.cpp
index 6a13bb582..8a36bca6c 100644
--- a/src/gui/windows/outfitwindow.cpp
+++ b/src/gui/windows/outfitwindow.cpp
@@ -61,11 +61,11 @@ OutfitWindow::OutfitWindow() :
Window(_("Outfits"), Modal_false, nullptr, "outfits.xml"),
ActionListener(),
// TRANSLATORS: outfits window button
- mPreviousButton(new Button(this, _("<"), "previous", this)),
+ mPreviousButton(new Button(this, _("<"), "previous", BUTTON_SKIN, this)),
// TRANSLATORS: outfits window button
- mNextButton(new Button(this, _(">"), "next", this)),
+ mNextButton(new Button(this, _(">"), "next", BUTTON_SKIN, this)),
// TRANSLATORS: outfits window button
- mEquipBottom(new Button(this, _("Equip"), "equip", this)),
+ mEquipBottom(new Button(this, _("Equip"), "equip", BUTTON_SKIN, this)),
// TRANSLATORS: outfits window label
mCurrentLabel(new Label(this, strprintf(_("Outfit: %d"), 1))),
// TRANSLATORS: outfits window checkbox
diff --git a/src/gui/windows/pincodedialog.cpp b/src/gui/windows/pincodedialog.cpp
index 257d5ae1c..223ad69c0 100644
--- a/src/gui/windows/pincodedialog.cpp
+++ b/src/gui/windows/pincodedialog.cpp
@@ -46,7 +46,7 @@ PincodeDialog::PincodeDialog(const std::string &restrict title,
mPasswordField(new PasswordField(this, std::string())),
mPincode(new Pincode(this, mPasswordField)),
// TRANSLATORS: text dialog button
- mOkButton(new Button(this, _("OK"), "OK", this)),
+ mOkButton(new Button(this, _("OK"), "OK", BUTTON_SKIN, this)),
mEnabledKeyboard(keyboard.isEnabled())
{
setStickyButtonLock(true);
@@ -54,8 +54,12 @@ PincodeDialog::PincodeDialog(const std::string &restrict title,
keyboard.setEnabled(false);
Label *const textLabel = new Label(this, msg);
- // TRANSLATORS: text dialog button
- Button *const cancelButton = new Button(this, _("Cancel"), "CANCEL", this);
+ Button *const cancelButton = new Button(this,
+ // TRANSLATORS: text dialog button
+ _("Cancel"),
+ "CANCEL",
+ BUTTON_SKIN,
+ this);
place(0, 0, textLabel, 4, 1);
place(0, 1, mPincode, 4, 1);
diff --git a/src/gui/windows/questswindow.cpp b/src/gui/windows/questswindow.cpp
index 3a01109d9..69243ab1d 100644
--- a/src/gui/windows/questswindow.cpp
+++ b/src/gui/windows/questswindow.cpp
@@ -77,7 +77,7 @@ QuestsWindow::QuestsWindow() :
fromBool(getOptionBool("showtextbackground", false), Opaque),
"quests_text_background.xml")),
// TRANSLATORS: quests window button
- mCloseButton(new Button(this, _("Close"), "close", this)),
+ mCloseButton(new Button(this, _("Close"), "close", BUTTON_SKIN, this)),
mCompleteIcon(Theme::getImageFromThemeXml("complete_icon.xml", "")),
mIncompleteIcon(Theme::getImageFromThemeXml("incomplete_icon.xml", "")),
mMapEffects(),
diff --git a/src/gui/windows/quitdialog.cpp b/src/gui/windows/quitdialog.cpp
index 34af9c51f..3484f9a48 100644
--- a/src/gui/windows/quitdialog.cpp
+++ b/src/gui/windows/quitdialog.cpp
@@ -64,9 +64,9 @@ QuitDialog::QuitDialog(QuitDialog **const pointerToMe) :
_("Switch character"), "quitdialog", false)),
mRate(nullptr),
// TRANSLATORS: quit dialog button
- mOkButton(new Button(this, _("OK"), "ok", this)),
+ mOkButton(new Button(this, _("OK"), "ok", BUTTON_SKIN, this)),
// TRANSLATORS: quit dialog button
- mCancelButton(new Button(this, _("Cancel"), "cancel", this)),
+ mCancelButton(new Button(this, _("Cancel"), "cancel", BUTTON_SKIN, this)),
mMyPointer(pointerToMe),
mNeedForceQuit(false)
{
diff --git a/src/gui/windows/registerdialog.cpp b/src/gui/windows/registerdialog.cpp
index 827e7c1ac..695fd58e2 100644
--- a/src/gui/windows/registerdialog.cpp
+++ b/src/gui/windows/registerdialog.cpp
@@ -60,9 +60,11 @@ RegisterDialog::RegisterDialog(LoginData &data) :
mConfirmField(new PasswordField(this, std::string())),
mEmailField(nullptr),
// TRANSLATORS: register dialog. button.
- mRegisterButton(new Button(this, _("Register"), "register", this)),
+ mRegisterButton(new Button(this, _("Register"), "register",
+ BUTTON_SKIN, this)),
// TRANSLATORS: register dialog. button.
- mCancelButton(new Button(this, _("Cancel"), "cancel", this)),
+ mCancelButton(new Button(this, _("Cancel"), "cancel",
+ BUTTON_SKIN, this)),
mMaleButton(nullptr),
mFemaleButton(nullptr),
mWrongDataNoticeListener(new WrongDataNoticeListener)
diff --git a/src/gui/windows/serverdialog.cpp b/src/gui/windows/serverdialog.cpp
index 69d945c4f..396c9184f 100644
--- a/src/gui/windows/serverdialog.cpp
+++ b/src/gui/windows/serverdialog.cpp
@@ -105,19 +105,21 @@ ServerDialog::ServerDialog(ServerInfo *const serverInfo,
mDir(dir),
mDescription(new Label(this, std::string())),
// TRANSLATORS: servers dialog button
- mQuitButton(new Button(this, _("Quit"), "quit", this)),
+ mQuitButton(new Button(this, _("Quit"), "quit", BUTTON_SKIN, this)),
// TRANSLATORS: servers dialog button
- mConnectButton(new Button(this, _("Connect"), "connect", this)),
+ mConnectButton(new Button(this, _("Connect"), "connect",
+ BUTTON_SKIN, this)),
// TRANSLATORS: servers dialog button
- mAddEntryButton(new Button(this, _("Add"), "addEntry", this)),
+ mAddEntryButton(new Button(this, _("Add"), "addEntry", BUTTON_SKIN, this)),
// TRANSLATORS: servers dialog button
- mEditEntryButton(new Button(this, _("Edit"), "editEntry", this)),
+ mEditEntryButton(new Button(this, _("Edit"), "editEntry",
+ BUTTON_SKIN, this)),
// TRANSLATORS: servers dialog button
- mDeleteButton(new Button(this, _("Delete"), "remove", this)),
+ mDeleteButton(new Button(this, _("Delete"), "remove", BUTTON_SKIN, this)),
// TRANSLATORS: servers dialog button
- mLoadButton(new Button(this, _("Load"), "load", this)),
+ mLoadButton(new Button(this, _("Load"), "load", BUTTON_SKIN, this)),
// TRANSLATORS: servers dialog button
- mInfoButton(new Button(this, _("Info"), "info", this)),
+ mInfoButton(new Button(this, _("Info"), "info", BUTTON_SKIN, this)),
mServersListModel(new ServersListModel(&mServers, this)),
mServersList(CREATEWIDGETR(ServersListBox, this, mServersListModel)),
mDownload(nullptr),
diff --git a/src/gui/windows/setupwindow.cpp b/src/gui/windows/setupwindow.cpp
index e838bbeb9..46ac33da7 100644
--- a/src/gui/windows/setupwindow.cpp
+++ b/src/gui/windows/setupwindow.cpp
@@ -116,7 +116,11 @@ void SetupWindow::postInit()
*curBtn != nullptr;
++ curBtn)
{
- Button *const btn = new Button(this, gettext(*curBtn), *curBtn, this);
+ Button *const btn = new Button(this,
+ gettext(*curBtn),
+ *curBtn,
+ BUTTON_SKIN,
+ this);
mButtons.push_back(btn);
x -= btn->getWidth() + mButtonPadding;
btn->setPosition(x, height - btn->getHeight() - mButtonPadding);
diff --git a/src/gui/windows/shopwindow.cpp b/src/gui/windows/shopwindow.cpp
index 754cf7eb9..91c7063de 100644
--- a/src/gui/windows/shopwindow.cpp
+++ b/src/gui/windows/shopwindow.cpp
@@ -111,7 +111,7 @@ ShopWindow::ShopWindow() :
ActionListener(),
SelectionListener(),
// TRANSLATORS: shop window button
- mCloseButton(new Button(this, _("Close"), "close", this)),
+ mCloseButton(new Button(this, _("Close"), "close", BUTTON_SKIN, this)),
mBuyShopItems(new ShopItems(false, DEFAULT_CURRENCY)),
mSellShopItems(new ShopItems(false, DEFAULT_CURRENCY)),
mTradeItem(nullptr),
@@ -124,9 +124,9 @@ ShopWindow::ShopWindow() :
fromBool(getOptionBool("showbuybackground", false), Opaque),
"shop_buy_background.xml")),
// TRANSLATORS: shop window label
- mAddButton(new Button(this, _("Add"), "add", this)),
+ mAddButton(new Button(this, _("Add"), "add", BUTTON_SKIN, this)),
// TRANSLATORS: shop window label
- mDeleteButton(new Button(this, _("Delete"), "delete", this)),
+ mDeleteButton(new Button(this, _("Delete"), "delete", BUTTON_SKIN, this)),
mAnnounceButton(nullptr),
mPublishButton(nullptr),
mRenameButton(nullptr),
@@ -191,17 +191,29 @@ ShopWindow::ShopWindow() :
if (mHaveVending)
{
- // TRANSLATORS: shop window button
- mPublishButton = new Button(this, _("Publish"), "publish", this);
- // TRANSLATORS: shop window button
- mRenameButton = new Button(this, _("Rename"), "rename", this);
+ mPublishButton = new Button(this,
+ // TRANSLATORS: shop window button
+ _("Publish"),
+ "publish",
+ BUTTON_SKIN,
+ this);
+ mRenameButton = new Button(this,
+ // TRANSLATORS: shop window button
+ _("Rename"),
+ "rename",
+ BUTTON_SKIN,
+ this);
placer(2, 6, mPublishButton, 1, 1);
placer(3, 6, mRenameButton, 1, 1);
}
else
{
- // TRANSLATORS: shop window button
- mAnnounceButton = new Button(this, _("Announce"), "announce", this);
+ mAnnounceButton = new Button(this,
+ // TRANSLATORS: shop window button
+ _("Announce"),
+ "announce",
+ BUTTON_SKIN,
+ this);
// TRANSLATORS: shop window checkbox
mAnnounceLinks = new CheckBox(this, _("Show links in announce"), false,
this, "link announce");
diff --git a/src/gui/windows/shortcutwindow.cpp b/src/gui/windows/shortcutwindow.cpp
index 69f255953..1b53ad455 100644
--- a/src/gui/windows/shortcutwindow.cpp
+++ b/src/gui/windows/shortcutwindow.cpp
@@ -164,7 +164,7 @@ void ShortcutWindow::addButton(const std::string &text,
{
place(mButtonIndex++,
5,
- new Button(this, text, eventName, listener),
+ new Button(this, text, eventName, BUTTON_SKIN, listener),
1,
1);
Window::widgetResized(Event(nullptr));
diff --git a/src/gui/windows/skilldialog.cpp b/src/gui/windows/skilldialog.cpp
index a22a1c127..8ded2a001 100644
--- a/src/gui/windows/skilldialog.cpp
+++ b/src/gui/windows/skilldialog.cpp
@@ -90,9 +90,9 @@ SkillDialog::SkillDialog() :
mDeleteTabs(),
mPointsLabel(new Label(this, "0")),
// TRANSLATORS: skills dialog button
- mUseButton(new Button(this, _("Use"), "use", this)),
+ mUseButton(new Button(this, _("Use"), "use", BUTTON_SKIN, this)),
// TRANSLATORS: skills dialog button
- mIncreaseButton(new Button(this, _("Up"), "inc", this)),
+ mIncreaseButton(new Button(this, _("Up"), "inc", BUTTON_SKIN, this)),
mDefaultModel(nullptr),
mDefaultTab(nullptr)
{
diff --git a/src/gui/windows/socialwindow.cpp b/src/gui/windows/socialwindow.cpp
index d06a73784..ab469cada 100644
--- a/src/gui/windows/socialwindow.cpp
+++ b/src/gui/windows/socialwindow.cpp
@@ -70,7 +70,7 @@ SocialWindow::SocialWindow() :
mFriends(new SocialFriendsTab(this, _("F"),
fromBool(getOptionBool("showtabbackground", false), Opaque))),
// TRANSLATORS: social window button
- mMenuButton(new Button(this, _("Menu"), "menu", this)),
+ mMenuButton(new Button(this, _("Menu"), "menu", BUTTON_SKIN, this)),
mCountLabel(new Label(this, "1000 / 1000")),
mTabs(CREATEWIDGETR(TabbedArea, this)),
mMap(nullptr),
diff --git a/src/gui/windows/statuswindow.cpp b/src/gui/windows/statuswindow.cpp
index f2fd52570..3403e1b4c 100644
--- a/src/gui/windows/statuswindow.cpp
+++ b/src/gui/windows/statuswindow.cpp
@@ -87,7 +87,7 @@ StatusWindow::StatusWindow() :
mJobBar(nullptr),
mBasicStatsPage(new StatsPageBasic(this)),
// TRANSLATORS: status window button
- mCopyButton(new Button(this, _("Copy to chat"), "copy", this))
+ mCopyButton(new Button(this, _("Copy to chat"), "copy", BUTTON_SKIN, this))
{
setWindowName("Status");
if (setupWindow != nullptr)
diff --git a/src/gui/windows/textcommandeditor.cpp b/src/gui/windows/textcommandeditor.cpp
index 88aae37c0..bbd1e4c2d 100644
--- a/src/gui/windows/textcommandeditor.cpp
+++ b/src/gui/windows/textcommandeditor.cpp
@@ -105,11 +105,11 @@ TextCommandEditor::TextCommandEditor(TextCommand *const command) :
mSchoolLvlField(new IntTextField(this, 0, 0, 0, Enable_true, 0)),
#endif // TMWA_SUPPORT
// TRANSLATORS: command editor button
- mCancelButton(new Button(this, _("Cancel"), "cancel", this)),
+ mCancelButton(new Button(this, _("Cancel"), "cancel", BUTTON_SKIN, this)),
// TRANSLATORS: command editor button
- mSaveButton(new Button(this, _("Save"), "save", this)),
+ mSaveButton(new Button(this, _("Save"), "save", BUTTON_SKIN, this)),
// TRANSLATORS: command editor button
- mDeleteButton(new Button(this, _("Delete"), "delete", this)),
+ mDeleteButton(new Button(this, _("Delete"), "delete", BUTTON_SKIN, this)),
mEnabledKeyboard(keyboard.isEnabled())
{
const int w = 350;
diff --git a/src/gui/windows/textdialog.cpp b/src/gui/windows/textdialog.cpp
index adc0d1a23..51a20bced 100644
--- a/src/gui/windows/textdialog.cpp
+++ b/src/gui/windows/textdialog.cpp
@@ -50,14 +50,18 @@ TextDialog::TextDialog(const std::string &restrict title,
mTextField(nullptr),
mPasswordField(nullptr),
// TRANSLATORS: text dialog button
- mOkButton(new Button(this, _("OK"), "OK", this)),
+ mOkButton(new Button(this, _("OK"), "OK", BUTTON_SKIN, this)),
mEnabledKeyboard(keyboard.isEnabled())
{
keyboard.setEnabled(false);
Label *const textLabel = new Label(this, msg);
- // TRANSLATORS: text dialog button
- Button *const cancelButton = new Button(this, _("Cancel"), "CANCEL", this);
+ Button *const cancelButton = new Button(this,
+ // TRANSLATORS: text dialog button
+ _("Cancel"),
+ "CANCEL",
+ BUTTON_SKIN,
+ this);
place(0, 0, textLabel, 4, 1);
if (isPassword)
diff --git a/src/gui/windows/textselectdialog.cpp b/src/gui/windows/textselectdialog.cpp
index 630e16418..9991a5754 100644
--- a/src/gui/windows/textselectdialog.cpp
+++ b/src/gui/windows/textselectdialog.cpp
@@ -87,11 +87,16 @@ void TextSelectDialog::postInit()
mSelectButton = new Button(this,
mSelectButtonName,
"select",
+ BUTTON_SKIN,
this);
if (mAllowQuit == AllowQuit_true)
{
- // TRANSLATORS: sell dialog button
- mQuitButton = new Button(this, _("Quit"), "quit", this);
+ mQuitButton = new Button(this,
+ // TRANSLATORS: sell dialog button
+ _("Quit"),
+ "quit",
+ BUTTON_SKIN,
+ this);
}
mSelectButton->setEnabled(false);
diff --git a/src/gui/windows/tradewindow.cpp b/src/gui/windows/tradewindow.cpp
index 380dc5c21..606d2a380 100644
--- a/src/gui/windows/tradewindow.cpp
+++ b/src/gui/windows/tradewindow.cpp
@@ -86,10 +86,12 @@ TradeWindow::TradeWindow() :
// TRANSLATORS: trade window money label
mMoneyLabel(new Label(this, strprintf(_("You get %s"), ""))),
// TRANSLATORS: trade window button
- mAddButton(new Button(this, _("Add"), "add", this)),
- mOkButton(new Button(this, "", "", this)), // Will be filled in later
+ mAddButton(new Button(this, _("Add"), "add", BUTTON_SKIN, this)),
+ mOkButton(new Button(this, "", "",
+ BUTTON_SKIN, this)), // Will be filled in later
// TRANSLATORS: trade window money change button
- mMoneyChangeButton(new Button(this, _("Change"), "money", this)),
+ mMoneyChangeButton(new Button(this, _("Change"), "money",
+ BUTTON_SKIN, this)),
mMoneyField(new TextField(this, std::string(),
LoseFocusOnTab_true, nullptr, std::string(), false)),
mAutoAddItem(nullptr),
diff --git a/src/gui/windows/updaterwindow.cpp b/src/gui/windows/updaterwindow.cpp
index e843b4e17..e994d11c5 100644
--- a/src/gui/windows/updaterwindow.cpp
+++ b/src/gui/windows/updaterwindow.cpp
@@ -191,9 +191,9 @@ UpdaterWindow::UpdaterWindow(const std::string &restrict updateHost,
// TRANSLATORS: updater window label
mLabel(new Label(this, _("Connecting..."))),
// TRANSLATORS: updater window button
- mCancelButton(new Button(this, _("Cancel"), "cancel", this)),
+ mCancelButton(new Button(this, _("Cancel"), "cancel", BUTTON_SKIN, this)),
// TRANSLATORS: updater window button
- mPlayButton(new Button(this, _("Play"), "play", this)),
+ mPlayButton(new Button(this, _("Play"), "play", BUTTON_SKIN, this)),
mProgressBar(new ProgressBar(this, 0.0, 310, 0,
ProgressColorId::PROG_UPDATE,
"updateprogressbar.xml", "updateprogressbar_fill.xml")),
diff --git a/src/gui/windows/whoisonline.cpp b/src/gui/windows/whoisonline.cpp
index fea808b04..30ce36220 100644
--- a/src/gui/windows/whoisonline.cpp
+++ b/src/gui/windows/whoisonline.cpp
@@ -107,7 +107,7 @@ WhoIsOnline::WhoIsOnline() :
mScrollArea(new ScrollArea(this,
mBrowserBox, Opaque_false, std::string())),
// TRANSLATORS: who is online. button.
- mUpdateButton(new Button(this, _("Update"), "update", this)),
+ mUpdateButton(new Button(this, _("Update"), "update", BUTTON_SKIN, this)),
mOnlinePlayers(),
mOnlineNicks(),
mFriends(),
diff --git a/src/gui/windows/worldselectdialog.cpp b/src/gui/windows/worldselectdialog.cpp
index f863c4065..86e6a0e87 100644
--- a/src/gui/windows/worldselectdialog.cpp
+++ b/src/gui/windows/worldselectdialog.cpp
@@ -50,9 +50,11 @@ WorldSelectDialog::WorldSelectDialog(const Worlds &worlds) :
mWorldListModel(new WorldListModel(worlds)),
mWorldList(CREATEWIDGETR(ListBox, this, mWorldListModel, "")),
// TRANSLATORS: world dialog button
- mChangeLoginButton(new Button(this, _("Change Login"), "login", this)),
+ mChangeLoginButton(new Button(this, _("Change Login"), "login",
+ BUTTON_SKIN, this)),
// TRANSLATORS: world dialog button
- mChooseWorld(new Button(this, _("Choose World"), "world", this))
+ mChooseWorld(new Button(this, _("Choose World"), "world",
+ BUTTON_SKIN, this))
{
ScrollArea *const worldsScroll = new ScrollArea(this, mWorldList,
fromBool(getOptionBool("showbackground", false), Opaque),