aboutsummaryrefslogtreecommitdiffstats
path: root/Game/Code/Menu/UMenuStatic.pas
diff options
context:
space:
mode:
Diffstat (limited to 'Game/Code/Menu/UMenuStatic.pas')
-rw-r--r--Game/Code/Menu/UMenuStatic.pas15
1 files changed, 10 insertions, 5 deletions
diff --git a/Game/Code/Menu/UMenuStatic.pas b/Game/Code/Menu/UMenuStatic.pas
index c19e6abc..2a5e1e93 100644
--- a/Game/Code/Menu/UMenuStatic.pas
+++ b/Game/Code/Menu/UMenuStatic.pas
@@ -25,6 +25,7 @@ var
Pet: integer;
begin
if Visible then
+ begin
DrawTexture(Texture);
//Reflection Mod
@@ -35,12 +36,12 @@ begin
//Bind Tex and GL Attributes
glEnable(GL_TEXTURE_2D);
glEnable(GL_BLEND);
+
glDepthRange(0, 10);
glDepthFunc(GL_LEQUAL);
- //glDepthFunc(GL_GEQUAL);
glEnable(GL_DEPTH_TEST);
+
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
- //glBlendFunc(GL_SRC_COLOR, GL_ZERO);
glBindTexture(GL_TEXTURE_2D, TexNum);
//Draw
@@ -51,13 +52,13 @@ begin
//Bottom Left
glColor4f(ColR * Int, ColG * Int, ColB * Int, 0);
- glTexCoord2f(TexX1*TexW, {TexY1*TexH*}0.5);
+ glTexCoord2f(TexX1*TexW, 0.5);
glVertex3f(x, y+h*scaleH + h*scaleH/2 + Reflectionspacing, z);
//Bottom Right
glColor4f(ColR * Int, ColG * Int, ColB * Int, 0);
- glTexCoord2f(TexX2*TexW, {TexY1*TexH*}0.5);
+ glTexCoord2f(TexX2*TexW, 0.5);
glVertex3f(x+w*scaleW, y+h*scaleH + h*scaleH/2 + Reflectionspacing, z);
//Top Right
@@ -65,9 +66,13 @@ begin
glTexCoord2f(TexX2*TexW, TexY2*TexH);
glVertex3f(x+w*scaleW, y+h*scaleH + Reflectionspacing, z);
glEnd;
+
+ glDisable(GL_TEXTURE_2D);
+ glDisable(GL_DEPTH_TEST);
+ glDisable(GL_BLEND);
end;
end;
-
+ end;
end;
constructor TStatic.Create(Textura: TTexture);