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.pas47
1 files changed, 47 insertions, 0 deletions
diff --git a/Game/Code/Menu/UMenuStatic.pas b/Game/Code/Menu/UMenuStatic.pas
index 4b10e54c..c19e6abc 100644
--- a/Game/Code/Menu/UMenuStatic.pas
+++ b/Game/Code/Menu/UMenuStatic.pas
@@ -8,6 +8,11 @@ type
public
Texture: TTexture; // Button Screen position and size
Visible: boolean;
+
+ //Reflection Mod
+ Reflection: boolean;
+ Reflectionspacing: Real;
+
procedure Draw;
constructor Create(Textura: TTexture); overload;
end;
@@ -21,6 +26,48 @@ var
begin
if Visible then
DrawTexture(Texture);
+
+ //Reflection Mod
+ if (Reflection) then // Draw Reflections
+ begin
+ with Texture do
+ 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
+ glBegin(GL_QUADS);//Top Left
+ glColor4f(ColR * Int, ColG * Int, ColB * Int, Alpha-0.3);
+ glTexCoord2f(TexX1*TexW, TexY2*TexH);
+ glVertex3f(x, y+h*scaleH+ Reflectionspacing, z);
+
+ //Bottom Left
+ glColor4f(ColR * Int, ColG * Int, ColB * Int, 0);
+ glTexCoord2f(TexX1*TexW, {TexY1*TexH*}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);
+ glVertex3f(x+w*scaleW, y+h*scaleH + h*scaleH/2 + Reflectionspacing, z);
+
+ //Top Right
+ glColor4f(ColR * Int, ColG * Int, ColB * Int, Alpha-0.3);
+ glTexCoord2f(TexX2*TexW, TexY2*TexH);
+ glVertex3f(x+w*scaleW, y+h*scaleH + Reflectionspacing, z);
+ glEnd;
+ end;
+ end;
+
end;
constructor TStatic.Create(Textura: TTexture);