summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorYohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer>2011-09-28 18:04:21 +0200
committerYohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer>2011-09-28 18:39:35 +0200
commitc82bb72ea54a15b47938c5cbe69459bbb8c47c40 (patch)
tree1cce76a9fc94bbea9cefe610488628ed0930542f /src
parent8ab253762233e0526e1965aa4430c0860fc7a9cb (diff)
downloadmana-c82bb72ea54a15b47938c5cbe69459bbb8c47c40.tar.gz
mana-c82bb72ea54a15b47938c5cbe69459bbb8c47c40.tar.bz2
mana-c82bb72ea54a15b47938c5cbe69459bbb8c47c40.tar.xz
mana-c82bb72ea54a15b47938c5cbe69459bbb8c47c40.zip
Small changes requested by o11c - part 1.
Diffstat (limited to 'src')
-rw-r--r--src/gui/widgets/button.cpp5
-rw-r--r--src/gui/widgets/button.h6
2 files changed, 8 insertions, 3 deletions
diff --git a/src/gui/widgets/button.cpp b/src/gui/widgets/button.cpp
index 61ec28a2..f0d7e022 100644
--- a/src/gui/widgets/button.cpp
+++ b/src/gui/widgets/button.cpp
@@ -37,8 +37,8 @@
int Button::mInstances = 0;
float Button::mAlpha = 1.0;
-ImageRect* Button::mButton;
-TextPopup* Button::mTextPopup = 0;
+ImageRect *Button::mButton;
+TextPopup *Button::mTextPopup = 0;
enum{
BUTTON_STANDARD, // 0
@@ -188,6 +188,7 @@ Button::~Button()
// Remove the popup
delete mTextPopup;
+ mTextPopup = 0;
}
removeButtonIcon();
}
diff --git a/src/gui/widgets/button.h b/src/gui/widgets/button.h
index 7463d2ad..94d550e9 100644
--- a/src/gui/widgets/button.h
+++ b/src/gui/widgets/button.h
@@ -96,7 +96,11 @@ class Button : public gcn::Button
Image** mButtonIcon; /**< Button Icons graphics */
- static TextPopup* mTextPopup; /**< The buttons popup */
+ /**
+ * The buttons popup
+ * @note: This is a global object. One for all the buttons.
+ */
+ static TextPopup* mTextPopup;
std::string mPopupText; /**< the current button text */
};