diff options
author | Andrei Karas <akaras@inbox.ru> | 2018-03-09 02:22:21 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2018-03-09 02:22:21 +0300 |
commit | aa7119314e1a33d908b98906d30be94eb116d02d (patch) | |
tree | a99092b16529937c20c6ec3a7d00d7f69eabfe35 /src/gui | |
parent | 0424b1383e3c07192b4493d5210b4384b5a69a75 (diff) | |
download | plus-aa7119314e1a33d908b98906d30be94eb116d02d.tar.gz plus-aa7119314e1a33d908b98906d30be94eb116d02d.tar.bz2 plus-aa7119314e1a33d908b98906d30be94eb116d02d.tar.xz plus-aa7119314e1a33d908b98906d30be94eb116d02d.zip |
Add skin parameter to all button constructors.
Diffstat (limited to 'src/gui')
61 files changed, 509 insertions, 228 deletions
diff --git a/src/gui/widgets/attrs/changedisplay.cpp b/src/gui/widgets/attrs/changedisplay.cpp index bcde30bfd..c094eafb3 100644 --- a/src/gui/widgets/attrs/changedisplay.cpp +++ b/src/gui/widgets/attrs/changedisplay.cpp @@ -47,7 +47,7 @@ ChangeDisplay::ChangeDisplay(const Widget2 *const widget, // TRANSLATORS: status window label mPoints(new Label(this, _("Max"))), // TRANSLATORS: status window label (plus sign) - mInc(new Button(this, _("+"), "inc", this)) + mInc(new Button(this, _("+"), "inc", BUTTON_SKIN, this)) { // Do the layout ContainerPlacer place = mLayout->getPlacer(0, 0); diff --git a/src/gui/widgets/button.cpp b/src/gui/widgets/button.cpp index 7a0fdef7d..dc3a7d063 100644 --- a/src/gui/widgets/button.cpp +++ b/src/gui/widgets/button.cpp @@ -95,7 +95,8 @@ static std::string const data[Button::BUTTON_COUNT] = "_disabled.xml" }; -Button::Button(const Widget2 *const widget) : +Button::Button(const Widget2 *const widget, + const std::string &restrict skinName) : Widget(widget), MouseListener(), KeyListener(), @@ -104,7 +105,7 @@ Button::Button(const Widget2 *const widget) : mSkin(), mCaption(), mDescription(), - mSkinName(BUTTON_SKIN), + mSkinName(skinName), mTextChunk(), mVertexes2(new ImageCollection), mEnabledColor(getThemeColor(ThemeColorId::BUTTON, 255U)), @@ -142,6 +143,7 @@ Button::Button(const Widget2 *const widget) : Button::Button(const Widget2 *const widget, const std::string &restrict caption, const std::string &restrict actionEventId, + const std::string &restrict skinName, ActionListener *const listener) : Widget(widget), MouseListener(), @@ -151,7 +153,7 @@ Button::Button(const Widget2 *const widget, mSkin(), mCaption(caption), mDescription(), - mSkinName(BUTTON_SKIN), + mSkinName(skinName), mTextChunk(), mVertexes2(new ImageCollection), mEnabledColor(getThemeColor(ThemeColorId::BUTTON, 255U)), @@ -193,8 +195,10 @@ Button::Button(const Widget2 *const widget, Button::Button(const Widget2 *const widget, const std::string &restrict caption, const std::string &restrict imageName, - const int imageWidth, const int imageHeight, + const int imageWidth, + const int imageHeight, const std::string &restrict actionEventId, + const std::string &restrict skinName, ActionListener *const listener) : Widget(widget), MouseListener(), @@ -204,7 +208,7 @@ Button::Button(const Widget2 *const widget, mSkin(), mCaption(caption), mDescription(), - mSkinName(BUTTON_SKIN), + mSkinName(skinName), mTextChunk(), mVertexes2(new ImageCollection), mEnabledColor(getThemeColor(ThemeColorId::BUTTON, 255U)), @@ -246,8 +250,10 @@ Button::Button(const Widget2 *const widget, Button::Button(const Widget2 *const widget, const std::string &restrict imageName, - const int imageWidth, const int imageHeight, + const int imageWidth, + const int imageHeight, const std::string &restrict actionEventId, + const std::string &restrict skinName, ActionListener *const listener) : Widget(widget), MouseListener(), @@ -257,7 +263,7 @@ Button::Button(const Widget2 *const widget, mSkin(), mCaption(), mDescription(), - mSkinName(BUTTON_SKIN), + mSkinName(skinName), mTextChunk(), mVertexes2(new ImageCollection), mEnabledColor(getThemeColor(ThemeColorId::BUTTON, 255U)), @@ -301,6 +307,7 @@ Button::Button(const Widget2 *const widget, const std::string &restrict caption, const std::string &restrict imageName, const std::string &restrict actionEventId, + const std::string &restrict skinName, ActionListener *const listener) : Widget(widget), MouseListener(), @@ -310,7 +317,7 @@ Button::Button(const Widget2 *const widget, mSkin(), mCaption(caption), mDescription(), - mSkinName(BUTTON_SKIN), + mSkinName(skinName), mTextChunk(), mVertexes2(new ImageCollection), mEnabledColor(getThemeColor(ThemeColorId::BUTTON, 255U)), diff --git a/src/gui/widgets/button.h b/src/gui/widgets/button.h index bd0766323..92ab1fa41 100644 --- a/src/gui/widgets/button.h +++ b/src/gui/widgets/button.h @@ -102,7 +102,8 @@ class Button final : public Widget, /** * Default constructor. */ - explicit Button(const Widget2 *const widget); + Button(const Widget2 *const widget, + const std::string &restrict skinName); /** * Constructor, sets the caption of the button to the given string and @@ -111,6 +112,7 @@ class Button final : public Widget, Button(const Widget2 *const widget, const std::string &restrict caption, const std::string &restrict actionEventId, + const std::string &restrict skinName, ActionListener *const listener); /** @@ -121,7 +123,8 @@ class Button final : public Widget, const std::string &restrict caption, const std::string &restrict imageName, const int imageWidth, const int imageHeight, - const std::string &actionEventId, + const std::string &restrict actionEventId, + const std::string &restrict skinName, ActionListener *const listener); /** @@ -130,8 +133,10 @@ class Button final : public Widget, */ Button(const Widget2 *const widget, const std::string &restrict imageName, - const int imageWidth, const int imageHeight, + const int imageWidth, + const int imageHeight, const std::string &restrict actionEventId, + const std::string &restrict skinName, ActionListener *const listener); /** @@ -142,6 +147,7 @@ class Button final : public Widget, const std::string &restrict imageName, const std::string &restrict caption, const std::string &restrict actionEventId, + const std::string &restrict skinName, ActionListener *const listener); A_DELETE_COPY(Button) diff --git a/src/gui/widgets/characterviewsmall.cpp b/src/gui/widgets/characterviewsmall.cpp index e2b359e66..9d8a937e3 100644 --- a/src/gui/widgets/characterviewsmall.cpp +++ b/src/gui/widgets/characterviewsmall.cpp @@ -35,8 +35,8 @@ CharacterViewSmall::CharacterViewSmall(CharSelectDialog *const widget, const int padding) : CharacterViewBase(widget, padding), mSelectedEntry(nullptr), - mPrevious(new Button(this, "<", "prev", this)), - mNext(new Button(this, ">", "next", this)), + mPrevious(new Button(this, "<", "prev", BUTTON_SKIN, this)), + mNext(new Button(this, ">", "next", BUTTON_SKIN, this)), mNumber(new Label(this, "??")), mCharacterEntries(entries) { diff --git a/src/gui/widgets/pincode.cpp b/src/gui/widgets/pincode.cpp index d05684056..e0f0ce3d8 100644 --- a/src/gui/widgets/pincode.cpp +++ b/src/gui/widgets/pincode.cpp @@ -94,7 +94,11 @@ void Pincode::addButtons() for (int f = 0; f < 10; f ++) { const std::string str = toString(f); - mButtons[f] = new Button(this, str, str, this); + mButtons[f] = new Button(this, + str, + str, + BUTTON_SKIN, + this); mButtons[f]->adjustSize(); const Rect &rect = mButtons[f]->getDimension(); if (rect.width > buttonWidth) @@ -122,6 +126,7 @@ void Pincode::addButtons() // TRANSLATORS: clear pin code button _("Clear"), "clear", + BUTTON_SKIN, this); mButtons[10]->adjustSize(); add(mButtons[10]); diff --git a/src/gui/widgets/selldialog.cpp b/src/gui/widgets/selldialog.cpp index 1d2b7a91c..dc612c0ac 100644 --- a/src/gui/widgets/selldialog.cpp +++ b/src/gui/widgets/selldialog.cpp @@ -114,9 +114,14 @@ void SellDialog::postInit() // TRANSLATORS: sell dialog button mAdvanced == Advanced_true ? _("Add") : _("Sell"), "presell", + BUTTON_SKIN, + this); + mQuitButton = new Button(this, + // TRANSLATORS: sell dialog button + _("Quit"), + "quit", + BUTTON_SKIN, this); - // TRANSLATORS: sell dialog button - mQuitButton = new Button(this, _("Quit"), "quit", this); initButtons(); @@ -133,12 +138,24 @@ void SellDialog::postInit() if (mIsSell == IsSell_true) { - // TRANSLATORS: sell dialog button - mIncreaseButton = new Button(this, _("+"), "inc", this); - // TRANSLATORS: sell dialog button - mDecreaseButton = new Button(this, _("-"), "dec", this); - // TRANSLATORS: sell dialog button - mAddMaxButton = new Button(this, _("Max"), "max", this); + mIncreaseButton = new Button(this, + // TRANSLATORS: sell dialog button + _("+"), + "inc", + BUTTON_SKIN, + this); + mDecreaseButton = new Button(this, + // TRANSLATORS: sell dialog button + _("-"), + "dec", + BUTTON_SKIN, + this); + mAddMaxButton = new Button(this, + // TRANSLATORS: sell dialog button + _("Max"), + "max", + BUTTON_SKIN, + this); mSlider = new Slider(this, 1.0, 1.0); mQuantityLabel = new Label(this, strprintf( @@ -149,8 +166,12 @@ void SellDialog::postInit() "", "")); if (mAdvanced == Advanced_true) { - // TRANSLATORS: sell dialog button - mConfirmButton = new Button(this, _("Sell"), "confirm", this); + mConfirmButton = new Button(this, + // TRANSLATORS: sell dialog button + _("Sell"), + "confirm", + BUTTON_SKIN, + this); mConfirmButton->setEnabled(false); } diff --git a/src/gui/widgets/setupbuttonitem.cpp b/src/gui/widgets/setupbuttonitem.cpp index 00ebe9fd8..c3c5c0d93 100644 --- a/src/gui/widgets/setupbuttonitem.cpp +++ b/src/gui/widgets/setupbuttonitem.cpp @@ -39,7 +39,11 @@ SetupButtonItem::SetupButtonItem(const std::string &restrict text, mButton(nullptr) { mValueType = VSTR; - mWidget = new Button(this, text, actionEventId, listener); + mWidget = new Button(this, + text, + actionEventId, + BUTTON_SKIN, + listener); createControls(); } diff --git a/src/gui/widgets/setupitem.cpp b/src/gui/widgets/setupitem.cpp index 507baab7d..7634a5dc9 100644 --- a/src/gui/widgets/setupitem.cpp +++ b/src/gui/widgets/setupitem.cpp @@ -373,8 +373,12 @@ void SetupItemTextField::createControls() mParent, mEventName, false); - // TRANSLATORS: setup item button - mButton = new Button(this, _("Edit"), mEventName + "_EDIT", mParent); + mButton = new Button(this, + // TRANSLATORS: setup item button + _("Edit"), + mEventName + "_EDIT", + BUTTON_SKIN, + mParent); mWidget = mTextField; mTextField->setWidth(200); fixFirstItemSize(mLabel); @@ -514,8 +518,12 @@ void SetupItemIntTextField::createControls() mTextField->setActionEventId(mEventName); mTextField->addActionListener(mParent); - // TRANSLATORS: setup item button - mButton = new Button(this, _("Edit"), mEventName + "_EDIT", mParent); + mButton = new Button(this, + // TRANSLATORS: setup item button + _("Edit"), + mEventName + "_EDIT", + BUTTON_SKIN, + mParent); mWidget = mTextField; mTextField->setWidth(50); fixFirstItemSize(mLabel); @@ -1293,8 +1301,12 @@ SetupItemSound::SetupItemSound(const std::string &restrict text, void SetupItemSound::addMoreControls() { - mButton = new Button(this, BUTTON_PLAY, 16, 16, - mEventName + "_PLAY", this); + mButton = new Button(this, + BUTTON_PLAY, + 16, 16, + mEventName + "_PLAY", + BUTTON_SKIN, + this); if (mHorizont != nullptr) mHorizont->add(mButton); } diff --git a/src/gui/widgets/setupquickitem.cpp b/src/gui/widgets/setupquickitem.cpp index 09fadab9b..c5911506d 100644 --- a/src/gui/widgets/setupquickitem.cpp +++ b/src/gui/widgets/setupquickitem.cpp @@ -73,7 +73,11 @@ void SetupQuickItem::createControls() { mHorizont = new HorizontContainer(this, 32, 2); - mWidget = new Button(this, ">", mEventName + "_CHANGE", nullptr); + mWidget = new Button(this, + ">", + mEventName + "_CHANGE", + BUTTON_SKIN, + nullptr); mLabel = new Label(this, std::string()); mLabel->setToolTip(mDescription); mLabel->adjustSize(); diff --git a/src/gui/widgets/sliderlist.cpp b/src/gui/widgets/sliderlist.cpp index cbe65684b..b55496815 100644 --- a/src/gui/widgets/sliderlist.cpp +++ b/src/gui/widgets/sliderlist.cpp @@ -58,8 +58,16 @@ void SliderList::postInit2(ActionListener *const listener, mPrevEventId = eventId + "_prev"; mNextEventId = eventId + "_next"; - mButtons[0] = new Button(this, "<", mPrevEventId, this); - mButtons[1] = new Button(this, ">", mNextEventId, this); + mButtons[0] = new Button(this, + "<", + mPrevEventId, + BUTTON_SKIN, + this); + mButtons[1] = new Button(this, + ">", + mNextEventId, + BUTTON_SKIN, + this); add(mButtons[0]); add(mLabel); diff --git a/src/gui/widgets/tabbedarea.cpp b/src/gui/widgets/tabbedarea.cpp index 18e2607a0..6e9fa5e19 100644 --- a/src/gui/widgets/tabbedarea.cpp +++ b/src/gui/widgets/tabbedarea.cpp @@ -113,8 +113,16 @@ void TabbedArea::postInit() mWidgetContainer->setOpaque(Opaque_false); addWidgetListener(this); - mArrowButton[0] = new Button(this, "<", "shift_left", this); - mArrowButton[1] = new Button(this, ">", "shift_right", this); + mArrowButton[0] = new Button(this, + "<", + "shift_left", + BUTTON_SKIN, + this); + mArrowButton[1] = new Button(this, + ">", + "shift_right", + BUTTON_SKIN, + this); widgetResized(Event(nullptr)); } diff --git a/src/gui/widgets/tabs/setup_input.cpp b/src/gui/widgets/tabs/setup_input.cpp index c2e451aed..adf9245bf 100644 --- a/src/gui/widgets/tabs/setup_input.cpp +++ b/src/gui/widgets/tabs/setup_input.cpp @@ -62,13 +62,17 @@ Setup_Input::Setup_Input(const Widget2 *const widget) : mKeyListModel(new KeyListModel), mKeyList(CREATEWIDGETR(ListBox, this, mKeyListModel, "")), // TRANSLATORS: button in input settings tab - mAssignKeyButton(new Button(this, _("Assign"), "assign", this)), + mAssignKeyButton(new Button(this, _("Assign"), "assign", + BUTTON_SKIN, this)), // TRANSLATORS: button in input settings tab - mUnassignKeyButton(new Button(this, _("Unassign"), "unassign", this)), + mUnassignKeyButton(new Button(this, _("Unassign"), "unassign", + BUTTON_SKIN, this)), // TRANSLATORS: button in input settings tab - mDefaultButton(new Button(this, _("Default"), "default", this)), + mDefaultButton(new Button(this, _("Default"), "default", + BUTTON_SKIN, this)), // TRANSLATORS: button in input settings tab - mResetKeysButton(new Button(this, _("Reset all keys"), "resetkeys", this)), + mResetKeysButton(new Button(this, _("Reset all keys"), "resetkeys", + BUTTON_SKIN, this)), mTabs(new TabStrip(this, config.getIntValue("fontSize") + 10, 0)), mScrollArea(new ScrollArea(this, mKeyList, Opaque_true, "setup_input_background.xml")), diff --git a/src/gui/widgets/tabs/setup_joystick.cpp b/src/gui/widgets/tabs/setup_joystick.cpp index a856f552e..e3dd95caf 100644 --- a/src/gui/widgets/tabs/setup_joystick.cpp +++ b/src/gui/widgets/tabs/setup_joystick.cpp @@ -46,9 +46,11 @@ Setup_Joystick::Setup_Joystick(const Widget2 *const widget) : // TRANSLATORS: joystick settings tab label _("Press the button to start calibration"))), // TRANSLATORS: joystick settings tab button - mCalibrateButton(new Button(this, _("Calibrate"), "calibrate", this)), + mCalibrateButton(new Button(this, _("Calibrate"), "calibrate", + BUTTON_SKIN, this)), // TRANSLATORS: joystick settings tab button - mDetectButton(new Button(this, _("Detect joysticks"), "detect", this)), + mDetectButton(new Button(this, _("Detect joysticks"), "detect", + BUTTON_SKIN, this)), // TRANSLATORS: joystick settings tab checkbox mJoystickEnabled(new CheckBox(this, _("Enable joystick"), false, nullptr, std::string())), diff --git a/src/gui/widgets/tabs/setup_relations.cpp b/src/gui/widgets/tabs/setup_relations.cpp index 55a53e482..85a861109 100644 --- a/src/gui/widgets/tabs/setup_relations.cpp +++ b/src/gui/widgets/tabs/setup_relations.cpp @@ -78,7 +78,8 @@ Setup_Relations::Setup_Relations(const Widget2 *const widget) : (playerRelations.getDefault() & PlayerRelation::WHISPER) != 0u, nullptr, std::string())), // TRANSLATORS: relation dialog button - mDeleteButton(new Button(this, _("Delete"), ACTION_DELETE, this)), + mDeleteButton(new Button(this, _("Delete"), ACTION_DELETE, + BUTTON_SKIN, this)), mIgnoreActionChoicesModel(new IgnoreChoicesListModel), mIgnoreActionChoicesBox(new DropDown(widget, mIgnoreActionChoicesModel, false, Modal_false, nullptr, std::string())) diff --git a/src/gui/widgets/tabs/setup_theme.cpp b/src/gui/widgets/tabs/setup_theme.cpp index 218536469..080573c3c 100644 --- a/src/gui/widgets/tabs/setup_theme.cpp +++ b/src/gui/widgets/tabs/setup_theme.cpp @@ -126,7 +126,7 @@ Setup_Theme::Setup_Theme(const Widget2 *const widget) : mNpcFontSizeDropDown(new DropDown(this, mNpcFontSizeListModel, false, Modal_false, nullptr, std::string())), // TRANSLATORS: button name with information about selected theme - mInfoButton(new Button(this, _("i"), ACTION_INFO, this)), + mInfoButton(new Button(this, _("i"), ACTION_INFO, BUTTON_SKIN, this)), mThemeInfo() { // TRANSLATORS: theme settings tab name diff --git a/src/gui/widgets/tabs/setup_video.cpp b/src/gui/widgets/tabs/setup_video.cpp index 561685dc2..557cdffce 100644 --- a/src/gui/widgets/tabs/setup_video.cpp +++ b/src/gui/widgets/tabs/setup_video.cpp @@ -86,7 +86,8 @@ Setup_Video::Setup_Video(const Widget2 *const widget) : mAltFpsLabel(new Label(this, _("Alt FPS limit: "))), #if !defined(ANDROID) && !defined(__APPLE__) && !defined(__native_client__) // TRANSLATORS: video settings button - mDetectButton(new Button(this, _("Detect best mode"), "detect", this)), + mDetectButton(new Button(this, _("Detect best mode"), "detect", + BUTTON_SKIN, this)), #endif // !defined(ANDROID) && !defined(__APPLE__) && // !defined(__native_client__) mDialog(nullptr), diff --git a/src/gui/widgets/tabstrip.cpp b/src/gui/widgets/tabstrip.cpp index d32b1414e..e0945b7b0 100644 --- a/src/gui/widgets/tabstrip.cpp +++ b/src/gui/widgets/tabstrip.cpp @@ -48,7 +48,8 @@ TabStrip::TabStrip(const Widget2 *const widget, Widget *TabStrip::createWidget(const std::string &text, const bool pressed) const { - Button *const widget = new Button(this); + Button *const widget = new Button(this, + BUTTON_SKIN); widget->setStick(true); widget->setCaption(text); widget->adjustSize(); diff --git a/src/gui/windowmenu.cpp b/src/gui/windowmenu.cpp index ad9da2433..15bb8df8a 100644 --- a/src/gui/windowmenu.cpp +++ b/src/gui/windowmenu.cpp @@ -282,7 +282,11 @@ void WindowMenu::addButton(const char *const text, const InputActionT key, const Visible visible) { - Button *const btn = new Button(this, gettext(text), text, this); + Button *const btn = new Button(this, + gettext(text), + text, + BUTTON_SKIN, + this); btn->setPosition(x, mPadding); btn->setDescription(description); btn->setTag(CAST_S32(key)); 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), |