From ef3069f212029c4ca277c2dc369d5f04066ef186 Mon Sep 17 00:00:00 2001 From: Bjørn Lindeijer Date: Thu, 14 Jul 2005 12:16:56 +0000 Subject: Code duplication reduction by Doener, instance counting by me, and a small improvement to the s character in the font. --- src/gui/progressbar.h | 23 ++++++----------------- 1 file changed, 6 insertions(+), 17 deletions(-) (limited to 'src/gui/progressbar.h') diff --git a/src/gui/progressbar.h b/src/gui/progressbar.h index 3e751459..9568de9d 100644 --- a/src/gui/progressbar.h +++ b/src/gui/progressbar.h @@ -25,6 +25,7 @@ #define _TMW_PROGRESSBAR_H #include +#include "../graphics.h" #include "../resources/image.h" /** @@ -74,37 +75,25 @@ class ProgressBar : public gcn::Widget { /** * Get The red value of color */ - unsigned char getRed() - { - return red; - } + unsigned char getRed(); /** * Get The red value of color */ - unsigned char getGreen() - { - return green; - } + unsigned char getGreen(); /** * Get The red value of color */ - unsigned char getBlue() - { - return blue; - } + unsigned char getBlue(); private: float progress; int red, green, blue; int redToGo, greenToGo, blueToGo; - // Bar Images - Image *dBackground; - Image *dTopLeftBorder, *dTopRightBorder, *dBottomLeftBorder; - Image *dBottomRightBorder; - Image *dLeftBorder, *dRightBorder, *dTopBorder, *dBottomBorder; + static ImageRect mBorder; + static int mInstances; }; #endif -- cgit v1.2.3-70-g09d2