From 5eeef71adcafe98dade6cc9d0c47a5260528592d Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 17 Oct 2013 20:37:05 +0300 Subject: Fix button defenition in button class. --- src/gui/widgets/button.cpp | 11 +---------- src/gui/widgets/button.h | 13 +++++++++++-- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/gui/widgets/button.cpp b/src/gui/widgets/button.cpp index 73aa63d34..f8ae3e65c 100644 --- a/src/gui/widgets/button.cpp +++ b/src/gui/widgets/button.cpp @@ -37,16 +37,7 @@ int Button::mInstances = 0; float Button::mAlpha = 1.0; -enum -{ - BUTTON_STANDARD = 0, // 0 - BUTTON_HIGHLIGHTED, // 1 - BUTTON_PRESSED, // 2 - BUTTON_DISABLED, // 3 - BUTTON_COUNT // 4 - Must be last. -}; - -static std::string const data[BUTTON_COUNT] = +static std::string const data[Button::BUTTON_COUNT] = { "button.xml", "button_highlighted.xml", diff --git a/src/gui/widgets/button.h b/src/gui/widgets/button.h index aa951ff7e..2ba91822b 100644 --- a/src/gui/widgets/button.h +++ b/src/gui/widgets/button.h @@ -135,11 +135,20 @@ class Button final : public gcn::Button, bool isPressed2() const A_WARN_UNUSED; + enum + { + BUTTON_STANDARD = 0, // 0 + BUTTON_HIGHLIGHTED, // 1 + BUTTON_PRESSED, // 2 + BUTTON_DISABLED, // 3 + BUTTON_COUNT // 4 - Must be last. + }; + private: void init(); - static Skin *button[4]; /**< Button state graphics */ - static int mInstances; /**< Number of button instances */ + static Skin *button[BUTTON_COUNT]; /**< Button state graphics */ + static int mInstances; /**< Number of button instances */ static float mAlpha; std::string mDescription; -- cgit v1.2.3-70-g09d2