From aa7119314e1a33d908b98906d30be94eb116d02d Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 9 Mar 2018 02:22:21 +0300 Subject: Add skin parameter to all button constructors. --- src/gui/widgets/button.cpp | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) (limited to 'src/gui/widgets/button.cpp') 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)), -- cgit v1.2.3-70-g09d2