aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/base/TextGL.pas8
-rw-r--r--src/base/ULyrics.pas30
2 files changed, 37 insertions, 1 deletions
diff --git a/src/base/TextGL.pas b/src/base/TextGL.pas
index 7da1d558..eb61c15e 100644
--- a/src/base/TextGL.pas
+++ b/src/base/TextGL.pas
@@ -73,6 +73,7 @@ procedure SetFontSize(Size: real);
procedure SetFontStyle(Style: integer); // sets active font style (normal, bold, etc)
procedure SetFontItalic(Enable: boolean); // sets italic type letter (works for all fonts)
procedure SetFontReflection(Enable:boolean;Spacing: real); // enables/disables text reflection
+procedure SetOutlineColor(R, G, B, A: GLFloat); // set outline color
implementation
@@ -242,6 +243,7 @@ begin
SetFontZ(0);
SetFontItalic(False);
SetFontReflection(False, 0);
+ SetOutlineColor(0,0,0,1);
end;
procedure SetFontPos(X, Y: real);
@@ -282,4 +284,10 @@ begin
Fonts[ActFont].Font.ReflectionSpacing := Spacing - Fonts[ActFont].Font.Descender;
end;
+procedure SetOutlineColor(R, G, B, A: GLFloat);
+begin
+ if (ActFont > 1) then
+ TFTScalableOutlineFont(Fonts[ActFont].Font).SetOutlineColor(R, G, B, A);
+end;
+
end.
diff --git a/src/base/ULyrics.pas b/src/base/ULyrics.pas
index 3f62db9c..4b2bc4ae 100644
--- a/src/base/ULyrics.pas
+++ b/src/base/ULyrics.pas
@@ -516,7 +516,11 @@ var
WordY: real; // word y-position
LyricsEffect: TLyricsEffect;
Alpha: real; // alphalevel to fade out at end
- ClipPlaneEq: array[0..3] of GLdouble; // clipping plane for slide effect
+ ClipPlaneEq: array[0..3] of GLdouble; // clipping plane for slide effect
+
+ OutlineColor_act: TRGB; // outline color actual line
+ OutlineColor_dis: TRGB; // outline color next line
+ OutlineColor_en: TRGB; // outline color sing line
{// duet mode
IconSize: real; // size of player icons
IconAlpha: real; // alpha level of player icons
@@ -592,6 +596,9 @@ begin
Alpha := 0;
end;
+ // outline color
+ SetOutlineColor(OutlineColor_act.R, OutlineColor_act.G, OutlineColor_act.B, Alpha);
+
// draw sentence before current word
if (LyricsEffect in [lfxSimple, lfxBall, lfxShift]) then
// only highlight current word and not that ones before in this line
@@ -604,10 +611,17 @@ begin
glColorRGB(LineColor_en, Alpha);
if (NextWord <> nil) then
begin
+
+ // outline color
+ SetOutlineColor(OutlineColor_en.R, OutlineColor_en.G, OutlineColor_en.B, Alpha);
+
DrawLyricsWords(Line, LyricX + NextWord.X, LyricY,
Line.CurWord+1, High(Line.Words));
end;
+ // outline color
+ SetOutlineColor(OutlineColor_act.R, OutlineColor_act.G, OutlineColor_act.B, Alpha);
+
// draw current word
if (LyricsEffect in [lfxSimple, lfxBall, lfxShift]) then
begin
@@ -680,12 +694,26 @@ begin
// enable the upper, disable the lower line
if (Line = UpperLine) then
+ begin
+ // outline color
+ SetOutlineColor(OutlineColor_en.R, OutlineColor_en.G, OutlineColor_en.B, Alpha);
+
glColorRGB(LineColor_en)
+ end
else
+ begin
+ // outline color
+ SetOutlineColor(OutlineColor_dis.R, OutlineColor_dis.G, OutlineColor_dis.B, Alpha);
+
glColorRGB(LineColor_dis);
+ end;
DrawLyricsWords(Line, LyricX, LyricY, 0, High(Line.Words));
end;
+
+ // reset
+ SetOutlineColor(0,0,0,1);
+
end;
{**