From 0424b1383e3c07192b4493d5210b4384b5a69a75 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 8 Mar 2018 23:53:39 +0300 Subject: Use own skin for each button. --- src/gui/widgets/button.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/gui/widgets/button.h') diff --git a/src/gui/widgets/button.h b/src/gui/widgets/button.h index 2721406ce..bd0766323 100644 --- a/src/gui/widgets/button.h +++ b/src/gui/widgets/button.h @@ -85,6 +85,7 @@ class ImageSet; class Skin; const std::string BUTTON_PLAY = "buttonplay.png"; +const std::string BUTTON_SKIN = "button"; /** * Button widget. Same as the Guichan button but with custom look. @@ -160,7 +161,7 @@ class Button final : public Widget, /** * Update the alpha value to the button components. */ - static void updateAlpha(); + void updateAlpha(); void mouseReleased(MouseEvent& event) override final; @@ -281,10 +282,9 @@ class Button final : public Widget, void init(); - static Skin *button[BUTTON_COUNT]; /**< Button state graphics */ - static int mInstances; /**< Number of button instances */ static float mAlpha; + Skin *mSkin[BUTTON_COUNT]; /**< Button state graphics */ /** * Holds the caption of the button. */ @@ -292,6 +292,8 @@ class Button final : public Widget, std::string mDescription; + std::string mSkinName; + TextChunk mTextChunk; ImageCollection *mVertexes2 A_NONNULLPOINTER; -- cgit v1.2.3-60-g2f50