From f80bf2dfb4de682a56abe79b7b0e5e0459804b30 Mon Sep 17 00:00:00 2001 From: Bjørn Lindeijer Date: Mon, 16 May 2005 21:53:10 +0000 Subject: Made button, checkbox and radiobutton count their instances and only load their resources once. Other widgets will follow later. --- src/gui/radiobutton.h | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'src/gui/radiobutton.h') diff --git a/src/gui/radiobutton.h b/src/gui/radiobutton.h index 3365e013..343854d2 100644 --- a/src/gui/radiobutton.h +++ b/src/gui/radiobutton.h @@ -38,16 +38,22 @@ class RadioButton : public gcn::RadioButton { RadioButton(const std::string& caption,const std::string& group, bool marked = false); + /** + * Destructor. + */ + ~RadioButton(); + /** * Draws the radiobutton, not the caption. */ void drawBox(gcn::Graphics* graphics); private: - Image *radioNormal; - Image *radioChecked; - Image *radioDisabled; - Image *radioDisabledChecked; + static int instances; + static Image *radioNormal; + static Image *radioChecked; + static Image *radioDisabled; + static Image *radioDisabledChecked; }; #endif /* _TMW_RADIOBUTTON_H */ -- cgit v1.2.3-60-g2f50