hedgewars/uStore.pas
changeset 1431 21ca09524f9c
parent 1294 50198e5c7f02
child 1525 311d0ab35d98
--- a/hedgewars/uStore.pas	Mon Oct 27 14:54:38 2008 +0000
+++ b/hedgewars/uStore.pas	Mon Oct 27 16:49:42 2008 +0000
@@ -37,6 +37,7 @@
 procedure DrawCentered(X, Top: LongInt; Source: PTexture);
 procedure DrawFromRect(X, Y: LongInt; r: PSDL_Rect; SourceTexture: PTexture);
 procedure DrawHedgehog(X, Y: LongInt; Dir: LongInt; Pos, Step: LongWord; Angle: real);
+procedure DrawFillRect(r: TSDL_Rect);
 function  RenderStringTex(s: string; Color: Longword; font: THWFont): PTexture;
 procedure RenderHealth(var Hedgehog: THedgehog);
 procedure AddProgress;
@@ -542,6 +543,25 @@
 glPopMatrix
 end;
 
+procedure DrawFillRect(r: TSDL_Rect);
+begin
+glDisable(GL_TEXTURE_2D);
+
+glColor4ub(0, 0, 0, 127);
+
+glBegin(GL_QUADS);
+
+glVertex2i(r.x       , r.y      );
+glVertex2i(r.x + r.w , r.y      );
+glVertex2i(r.x + r.w , r.y + r.h);
+glVertex2i(r.x       , r.y + r.h);
+
+glEnd();
+
+glColor4f(1, 1, 1, 1);
+glEnable(GL_TEXTURE_2D)
+end;
+
 procedure StoreRelease;
 var ii: TSprite;
 begin