diff options
author | Andrei Karas <akaras@inbox.ru> | 2018-03-08 23:53:39 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2018-03-09 00:19:37 +0300 |
commit | 0424b1383e3c07192b4493d5210b4384b5a69a75 (patch) | |
tree | 531f5b541bde1f0a02cb1f35b0a95f4061a59b6b /src/gui/widgets/button.h | |
parent | 2061d47d50cafad5fd5d412b25c1dae110cd85ab (diff) | |
download | mv-0424b1383e3c07192b4493d5210b4384b5a69a75.tar.gz mv-0424b1383e3c07192b4493d5210b4384b5a69a75.tar.bz2 mv-0424b1383e3c07192b4493d5210b4384b5a69a75.tar.xz mv-0424b1383e3c07192b4493d5210b4384b5a69a75.zip |
Use own skin for each button.
Diffstat (limited to 'src/gui/widgets/button.h')
-rw-r--r-- | src/gui/widgets/button.h | 8 |
1 files changed, 5 insertions, 3 deletions
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; |