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/button.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/gui/button.h') diff --git a/src/gui/button.h b/src/gui/button.h index a9ddd3fa..c3be49f2 100644 --- a/src/gui/button.h +++ b/src/gui/button.h @@ -40,13 +40,19 @@ class Button : public gcn::Button { */ Button(const std::string& caption); + /** + * Destructor. + */ + ~Button(); + /** * Draws the button. */ void draw(gcn::Graphics* graphics); private: - ImageRect button[4]; + static ImageRect button[4]; /**< Button state graphics */ + static int instances; /**< Number of button instances */ }; #endif -- cgit v1.2.3-70-g09d2