diff options
author | Yohann Ferreira <bertram@cegetel.net> | 2005-01-25 21:15:31 +0000 |
---|---|---|
committer | Yohann Ferreira <bertram@cegetel.net> | 2005-01-25 21:15:31 +0000 |
commit | ea18709a07120f06a00fef5068e01c90da1ea578 (patch) | |
tree | f5048e910dc749ec10aab00a28205c199197c8f6 /src/gui/progressbar.cpp | |
parent | 0d088f16638a055a37642b13610a260175bf5039 (diff) | |
download | mana-ea18709a07120f06a00fef5068e01c90da1ea578.tar.gz mana-ea18709a07120f06a00fef5068e01c90da1ea578.tar.bz2 mana-ea18709a07120f06a00fef5068e01c90da1ea578.tar.xz mana-ea18709a07120f06a00fef5068e01c90da1ea578.zip |
*** empty log message ***
Diffstat (limited to 'src/gui/progressbar.cpp')
-rw-r--r-- | src/gui/progressbar.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/gui/progressbar.cpp b/src/gui/progressbar.cpp index 3ccb9764..e3766913 100644 --- a/src/gui/progressbar.cpp +++ b/src/gui/progressbar.cpp @@ -46,31 +46,31 @@ void ProgressBar::draw(gcn::Graphics *graphics) getAbsolutePosition(absx, absy); // outer bar - DrawLine(screen, absx+X+7, absy+Y, absx+X+Width, absy+Y, abs(Red-70), abs(Green-70), abs(Blue-70)); - DrawLine(screen, absx+X, absy+Y+7, absx+X+Width-7, absy+Y+7, abs(Red-70), abs(Green-70), abs(Blue-70)); - DrawLine(screen, absx+X+7, absy+Y, absx+X, absy+Y+7, abs(Red-70), abs(Green-70), abs(Blue-70)); - DrawLine(screen, absx+X+Width, absy+Y, absx+X+Width-7, absy+Y+7, abs(Red-70), abs(Green-70), abs(Blue-70)); + DrawLine(screen, absx+X+PROGRESSBAR_HEIGHT, absy+Y, absx+X+Width, absy+Y, abs(Red-70), abs(Green-70), abs(Blue-70)); + DrawLine(screen, absx+X, absy+Y+PROGRESSBAR_HEIGHT, absx+X+Width-PROGRESSBAR_HEIGHT, absy+Y+PROGRESSBAR_HEIGHT, abs(Red-70), abs(Green-70), abs(Blue-70)); + DrawLine(screen, absx+X+PROGRESSBAR_HEIGHT, absy+Y, absx+X, absy+Y+PROGRESSBAR_HEIGHT, abs(Red-70), abs(Green-70), abs(Blue-70)); + DrawLine(screen, absx+X+Width, absy+Y, absx+X+Width-PROGRESSBAR_HEIGHT, absy+Y+PROGRESSBAR_HEIGHT, abs(Red-70), abs(Green-70), abs(Blue-70)); // Shadow of outer bar - DrawLine(screen, absx+X+1, absy+Y+7+1, absx+X+Width-7, absy+Y+7+1, 20, 20, 20); - DrawLine(screen, absx+X+Width+1, absy+Y, absx+X+Width-7+1, absy+Y+7, 20, 20, 20); + DrawLine(screen, absx+X+1, absy+Y+PROGRESSBAR_HEIGHT+1, absx+X+Width-PROGRESSBAR_HEIGHT, absy+Y+PROGRESSBAR_HEIGHT+1, 20, 20, 20); + DrawLine(screen, absx+X+Width+1, absy+Y, absx+X+Width-PROGRESSBAR_HEIGHT+1, absy+Y+PROGRESSBAR_HEIGHT, 20, 20, 20); // Inner bar int Temp = 0; - for(int i = 1; i < 7; i++) + for(int i = 1; i < PROGRESSBAR_HEIGHT; i++) { Temp = absx+X+int(float(Width)*progress)-i-1; - if (Temp < (absx + X + 8 - i)) Temp = (absx + X + 8 - i); - DrawLine(screen, absx+X+8-i, absy+Y+i, Temp, absy+Y+i, Red, Green, Blue); + if (Temp < (absx + X + PROGRESSBAR_HEIGHT + 1 - i)) Temp = (absx + X + PROGRESSBAR_HEIGHT + 1 - i); + DrawLine(screen, absx + X + PROGRESSBAR_HEIGHT + 1 - i, absy+Y+i, Temp, absy+Y+i, Red, Green, Blue); } // Shadow of inner bar Temp = absx+X+int(float(Width)*progress)-2; - if ( Temp < (absx+X+7+1) ) Temp = absx+X+7; - DrawLine(screen, absx+X+7+1, absy+Y+1, Temp, absy+Y+1, abs(Red-40), abs(Green-40), abs(Blue-40)); - DrawLine(screen, absx+X+7, absy+Y+1, absx+X+2, absy+Y+7-1, abs(Red-40), abs(Green-40), abs(Blue-40)); + if ( Temp < (absx+X+PROGRESSBAR_HEIGHT+1) ) Temp = absx+X+PROGRESSBAR_HEIGHT; + DrawLine(screen, absx+X+PROGRESSBAR_HEIGHT+1, absy+Y+1, Temp, absy+Y+1, abs(Red-40), abs(Green-40), abs(Blue-40)); + DrawLine(screen, absx+X+PROGRESSBAR_HEIGHT, absy+Y+1, absx+X+2, absy+Y+PROGRESSBAR_HEIGHT-1, abs(Red-40), abs(Green-40), abs(Blue-40)); } |