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/checkbox.h | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'src/gui/checkbox.h') diff --git a/src/gui/checkbox.h b/src/gui/checkbox.h index 80612b71..947e6432 100644 --- a/src/gui/checkbox.h +++ b/src/gui/checkbox.h @@ -40,16 +40,22 @@ class CheckBox : public gcn::CheckBox { */ CheckBox(const std::string& caption, bool marked = false); + /** + * Destructor. + */ + ~CheckBox(); + /** * Draws the check box, not the caption. */ void drawBox(gcn::Graphics* graphics); - + private: - Image *checkBoxNormal; - Image *checkBoxChecked; - Image *checkBoxDisabled; - Image *checkBoxDisabledChecked; + static int instances; + static Image *checkBoxNormal; + static Image *checkBoxChecked; + static Image *checkBoxDisabled; + static Image *checkBoxDisabledChecked; }; #endif -- cgit v1.2.3-70-g09d2