aboutsummaryrefslogtreecommitdiffstats
path: root/Game/Code/Menu/UMenuText.pas
diff options
context:
space:
mode:
authormogguh <mogguh@b956fd51-792f-4845-bead-9b4dfca2ff2c>2008-05-05 13:02:28 +0000
committermogguh <mogguh@b956fd51-792f-4845-bead-9b4dfca2ff2c>2008-05-05 13:02:28 +0000
commit808007e7eef95427292f9aa2bb63541ddef020ec (patch)
treecda1ffeed6108b7d5373627d4a4c7d40389fc418 /Game/Code/Menu/UMenuText.pas
parentad4c54706eaab157d975f832aecc836adbef827c (diff)
downloadusdx-808007e7eef95427292f9aa2bb63541ddef020ec.tar.gz
usdx-808007e7eef95427292f9aa2bb63541ddef020ec.tar.xz
usdx-808007e7eef95427292f9aa2bb63541ddef020ec.zip
Added text reflection as new property in the theme
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1060 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'Game/Code/Menu/UMenuText.pas')
-rw-r--r--Game/Code/Menu/UMenuText.pas18
1 files changed, 15 insertions, 3 deletions
diff --git a/Game/Code/Menu/UMenuText.pas b/Game/Code/Menu/UMenuText.pas
index 4b376a90..3ed0095e 100644
--- a/Game/Code/Menu/UMenuText.pas
+++ b/Game/Code/Menu/UMenuText.pas
@@ -40,6 +40,10 @@ type
Visible: boolean;
Align: integer; // 0 = left, 1 = center, 2 = right
+ //Reflection
+ Reflection: boolean;
+ ReflectionSpacing: Real;
+
procedure SetSelect(Value: Boolean);
property Selected: Boolean read SelectBool write SetSelect;
@@ -51,7 +55,7 @@ type
procedure Draw;
constructor Create; overload;
constructor Create(X, Y: real; Tekst: string); overload;
- constructor Create(ParX, ParY, ParW: real; ParStyle: integer; ParSize, ParColR, ParColG, ParColB: real; ParAlign: integer; ParTekst: string); overload;
+ constructor Create(ParX, ParY, ParW: real; ParStyle: integer; ParSize, ParColR, ParColG, ParColB: real; ParAlign: integer; ParTekst: string; ParReflection: Boolean; ParReflectionSpacing: Real) overload;
end;
implementation
@@ -276,6 +280,12 @@ begin
glColor4f(ColR*Int, ColG*Int, ColB*Int, Alpha);
+ //Reflection
+ if Reflection = true then
+ SetFontReflection(true,ReflectionSpacing)
+ else
+ SetFontReflection(false,0);
+
//If Selected Set Blink...
if SelectBool then
begin
@@ -346,10 +356,10 @@ end;
constructor TText.Create(X, Y: real; Tekst: string);
begin
- Create(X, Y, 0, 0, 10, 0, 0, 0, 0, Tekst);
+ Create(X, Y, 0, 0, 10, 0, 0, 0, 0, Tekst, false, 0);
end;
-constructor TText.Create(ParX, ParY, ParW: real; ParStyle: integer; ParSize, ParColR, ParColG, ParColB: real; ParAlign: integer; ParTekst: string);
+constructor TText.Create(ParX, ParY, ParW: real; ParStyle: integer; ParSize, ParColR, ParColG, ParColB: real; ParAlign: integer; ParTekst: string; ParReflection: Boolean; ParReflectionSpacing: Real);
begin
inherited Create;
Alpha := 1;
@@ -366,6 +376,8 @@ begin
Align := ParAlign;
SelectBool := false;
Visible := true;
+ Reflection:= ParReflection;
+ ReflectionSpacing:= ParReflectionSpacing;
end;