diff options
author | mogguh <mogguh@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2007-05-03 21:09:24 +0000 |
---|---|---|
committer | mogguh <mogguh@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2007-05-03 21:09:24 +0000 |
commit | 0f327cf133373168d94538686b57c22ba364f2a8 (patch) | |
tree | 6bdddf941c78a34563c15c942f3aec6a47287915 /Game | |
parent | 3114977b5509c775c93d5ba3d5220a1ff9d363a7 (diff) | |
download | usdx-0f327cf133373168d94538686b57c22ba364f2a8.tar.gz usdx-0f327cf133373168d94538686b57c22ba364f2a8.tar.xz usdx-0f327cf133373168d94538686b57c22ba364f2a8.zip |
Feature: It's now possible to move/skin the time progress thing (no fix positions anymore) (affected: UDraw.pas, UGraphic.pas, UThemes.pas, UScreenSing.pas, UScreenSingModi.pas)
Theme/Skin: Added the time stuff beneath the lyrics (as "the others" did too)
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@164 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to '')
-rw-r--r-- | Game/Code/Classes/UDraw.pas | 65 | ||||
-rw-r--r-- | Game/Code/Classes/UGraphic.pas | 6 | ||||
-rw-r--r-- | Game/Code/Classes/UThemes.pas | 18 | ||||
-rw-r--r-- | Game/Code/Screens/UScreenSing.pas | 24 | ||||
-rw-r--r-- | Game/Code/Screens/UScreenSingModi.pas | 10 |
5 files changed, 83 insertions, 40 deletions
diff --git a/Game/Code/Classes/UDraw.pas b/Game/Code/Classes/UDraw.pas index f5722175..41225c0d 100644 --- a/Game/Code/Classes/UDraw.pas +++ b/Game/Code/Classes/UDraw.pas @@ -12,6 +12,11 @@ procedure SingDrawBeatDelimeters(Left, Top, Right: real; NrCzesci: integer); procedure SingDrawCzesc(Left, Top, Right: real; NrCzesci: integer; Space: integer);
procedure SingDrawPlayerCzesc(X, Y, W: real; NrGracza: integer; Space: integer);
procedure SingDrawPlayerBGCzesc(Left, Top, Right: real; NrCzesci, NrGracza: integer; Space: integer);
+
+// TimeBar mod
+procedure SingDrawTimeBar();
+// eoa TimeBar mod
+
{ for no use since we have UGraphicClasses
procedure SingDrawStar(X, Y, A: real);
procedure SingGoldenStar(X, Y, A: real);
@@ -615,20 +620,9 @@ begin // background //BG Fullsize Mod
//SingDrawBackground;
- // time bar
-// Log.LogStatus('Time Bar', 'SingDraw');
- glBegin(GL_QUADS);
- glColor3f(0.9, 0.9, 0.9);
- glVertex2f(140 + 10*ScreenX, 21);
- glVertex2f(140 + 10*ScreenX, 29);
- glVertex2f(330 + 10*ScreenX, 29);
- glVertex2f(330 + 10*ScreenX, 21);
- glColor3f(Skin_TimeR, Skin_TimeG, Skin_TimeB);
- glVertex2f(140 + 10*ScreenX, 21);
- glVertex2f(140 + 10*ScreenX, 29);
- glVertex2f(140 + 10*ScreenX+(330-140)*(Czas.Teraz/Czas.Razem), 29);
- glVertex2f(140 + 10*ScreenX+(330-140)*(Czas.Teraz/Czas.Razem), 21);
- glEnd;
+ //TimeBar mod
+ SingDrawTimeBar();
+ //eoa TimeBar mod
// rysuje paski pod nutami
if PlayersPlay = 1 then
@@ -1020,18 +1014,7 @@ begin // time bar
// Log.LogStatus('Time Bar', 'SingDraw');
- glBegin(GL_QUADS);
- glColor3f(0.9, 0.9, 0.9);
- glVertex2f(140 + 10*ScreenX, 21);
- glVertex2f(140 + 10*ScreenX, 29);
- glVertex2f(330 + 10*ScreenX, 29);
- glVertex2f(330 + 10*ScreenX, 21);
- glColor3f(Skin_TimeR, Skin_TimeG, Skin_TimeB);
- glVertex2f(140 + 10*ScreenX, 21);
- glVertex2f(140 + 10*ScreenX, 29);
- glVertex2f(140 + 10*ScreenX+(330-140)*(Czas.Teraz/Czas.Razem), 29);
- glVertex2f(140 + 10*ScreenX+(330-140)*(Czas.Teraz/Czas.Razem), 21);
- glEnd;
+ SingDrawTimeBar();
if DLLMan.Selected.ShowNotes then
begin
@@ -1652,5 +1635,35 @@ begin glDisable(GL_TEXTURE_2D);
end;
+procedure SingDrawTimeBar();
+var x,y: real;
+ width, height: real;
+begin
+ x := Theme.Sing.StaticTimeProgress.x;
+ y := Theme.Sing.StaticTimeProgress.y;
+ width:= Theme.Sing.StaticTimeProgress.w;
+ height:= Theme.Sing.StaticTimeProgress.h;
+
+ glColor4f(Theme.Sing.StaticTimeProgress.ColR,
+ Theme.Sing.StaticTimeProgress.ColG,
+ Theme.Sing.StaticTimeProgress.ColB, 1); //Set Color
+
+ glEnable(GL_TEXTURE_2D);
+ glEnable(GL_BLEND);
+
+ glBindTexture(GL_TEXTURE_2D, Tex_TimeProgress.TexNum);
+
+ glBegin(GL_QUADS);
+ glTexCoord2f(0, 0); glVertex2f(x,y);
+ glTexCoord2f(0, 1); glVertex2f(x+width*(Czas.Teraz/Czas.Razem), y);
+ glTexCoord2f(1, 1); glVertex2f(x+width*(Czas.Teraz/Czas.Razem), y+height);
+ glTexCoord2f(1, 0); glVertex2f(x, y+height);
+ glEnd;
+
+ glDisable(GL_TEXTURE_2D);
+ glDisable(GL_BLEND);
+ glcolor4f(1,1,1,1);
+end;
+
end.
diff --git a/Game/Code/Classes/UGraphic.pas b/Game/Code/Classes/UGraphic.pas index 8b17a73d..7fd159f7 100644 --- a/Game/Code/Classes/UGraphic.pas +++ b/Game/Code/Classes/UGraphic.pas @@ -93,7 +93,7 @@ var Tex_Lyric_Help_Bar: TTexture;
FullScreen: boolean;
-
+ Tex_TimeProgress: TTexture;
//Sing Bar Mod
Tex_SingBar_Back: TTexture;
@@ -211,6 +211,10 @@ begin Tex_Lyric_Help_Bar := Texture.LoadTexture(pchar(Skin.GetTextureFileName('LyricHelpBar')), 'BMP', 'Transparent', $FF00FF);
+ //TimeBar mod
+ Tex_TimeProgress := Texture.LoadTexture(pchar(Skin.GetTextureFileName('TimeBar')));
+ //eoa TimeBar mod
+
//SingBar Mod
Tex_SingBar_Back := Texture.LoadTexture(pchar(Skin.GetTextureFileName('SingBarBack')), 'JPG', 'Plain', 0);
Tex_SingBar_Bar := Texture.LoadTexture(pchar(Skin.GetTextureFileName('SingBarBar')), 'JPG', 'Plain', 0);
diff --git a/Game/Code/Classes/UThemes.pas b/Game/Code/Classes/UThemes.pas index ee88ca9c..7f4763c3 100644 --- a/Game/Code/Classes/UThemes.pas +++ b/Game/Code/Classes/UThemes.pas @@ -296,9 +296,15 @@ type end;
TThemeSing = class(TThemeBasic)
+
+ //TimeBar mod
+ StaticTimeProgress: TThemeStatic;
+ TextTimeText : TThemeText;
+ //eoa TimeBar mod
+
StaticP1: TThemeStatic;
- StaticP1ScoreBG: TThemeStatic; //Static for ScoreBG
TextP1: TThemeText;
+ StaticP1ScoreBG: TThemeStatic; //Static for ScoreBG
TextP1Score: TThemeText;
//moveable singbar mod
@@ -988,6 +994,11 @@ begin // Sing
ThemeLoadBasic(Sing, 'Sing');
+ //TimeBar mod
+ ThemeLoadStatic(Sing.StaticTimeProgress, 'SingTimeProgress');
+ ThemeLoadText(Sing.TextTimeText, 'SingTimeText');
+ //eoa TimeBar mod
+
//moveable singbar mod
ThemeLoadStatic(Sing.StaticP1SingBar, 'SingP1SingBar');
ThemeLoadStatic(Sing.StaticP1TwoPSingBar, 'SingP1TwoPSingBar');
@@ -1973,6 +1984,11 @@ begin ThemeSaveBasic(Sing, 'Sing');
+ //TimeBar mod
+ ThemeSaveStatic(Sing.StaticTimeProgress, 'SingTimeProgress');
+ ThemeSaveText(Sing.TextTimeText, 'SingTimeText');
+ //eoa TimeBar mod
+
ThemeSaveStatic(Sing.StaticP1, 'SingP1Static');
ThemeSaveText(Sing.TextP1, 'SingP1Text');
ThemeSaveStatic(Sing.StaticP1ScoreBG, 'SingP1Static2');
diff --git a/Game/Code/Screens/UScreenSing.pas b/Game/Code/Screens/UScreenSing.pas index 93c3ac48..3e66b197 100644 --- a/Game/Code/Screens/UScreenSing.pas +++ b/Game/Code/Screens/UScreenSing.pas @@ -12,7 +12,12 @@ type PauseTime: Real;
NumEmptySentences: integer;
public
- TextTime: integer;
+ //TextTime: integer;
+
+ //TimeBar mod
+ StaticTimeProgress: integer;
+ TextTimeText: integer;
+ //eoa TimeBar mod
StaticP1: integer;
StaticP1ScoreBG: integer;
@@ -166,7 +171,12 @@ begin LoadFromTheme(Theme.Sing);
// time
- TextTime := AddText(75, 14, 1, 8, 0.25, 0.25, 0.25, '00:00');
+ //TextTime := AddText(75, 14, 1, 8, 0.25, 0.25, 0.25, '00:00');
+
+ //TimeBar mod
+ StaticTimeProgress := AddStatic(Theme.Sing.StaticTimeProgress);
+ TextTimeText := AddText(Theme.Sing.TextTimeText);
+ //eoa TimeBar mod
StaticP1 := AddStatic(Theme.Sing.StaticP1);
StaticP1ScoreBG := AddStatic(Theme.Sing.StaticP1ScoreBG);
@@ -908,11 +918,11 @@ begin // update static menu with time ...
Min := Round(Czas.Teraz) div 60;
Sec := Round(Czas.Teraz) mod 60;
- Text[TextTime].Text := '';
- if Min < 10 then Text[TextTime].Text := '0';
- Text[TextTime].Text := Text[TextTime].Text + IntToStr(Min) + ':';
- if Sec < 10 then Text[TextTime].Text := Text[TextTime].Text + '0';
- Text[TextTime].Text := Text[TextTime].Text + IntToStr(Sec);
+ Text[TextTimeText].Text := '';
+ if Min < 10 then Text[TextTimeText].Text := '0';
+ Text[TextTimeText].Text := Text[TextTimeText].Text + IntToStr(Min) + ':';
+ if Sec < 10 then Text[TextTimeText].Text := Text[TextTimeText].Text + '0';
+ Text[TextTimeText].Text := Text[TextTimeText].Text + IntToStr(Sec);
// .. and scores
if PlayersPlay = 1 then begin
diff --git a/Game/Code/Screens/UScreenSingModi.pas b/Game/Code/Screens/UScreenSingModi.pas index 86613152..484d7d56 100644 --- a/Game/Code/Screens/UScreenSingModi.pas +++ b/Game/Code/Screens/UScreenSingModi.pas @@ -927,11 +927,11 @@ begin // update static menu with time ...
Min := Round(Czas.Teraz) div 60;
Sec := Round(Czas.Teraz) mod 60;
- Text[TextTime].Text := '';
- if Min < 10 then Text[TextTime].Text := '0';
- Text[TextTime].Text := Text[TextTime].Text + IntToStr(Min) + ':';
- if Sec < 10 then Text[TextTime].Text := Text[TextTime].Text + '0';
- Text[TextTime].Text := Text[TextTime].Text + IntToStr(Sec);
+ Text[TextTimeText].Text := '';
+ if Min < 10 then Text[TextTimeText].Text := '0';
+ Text[TextTimeText].Text := Text[TextTimeText].Text + IntToStr(Min) + ':';
+ if Sec < 10 then Text[TextTimeText].Text := Text[TextTimeText].Text + '0';
+ Text[TextTimeText].Text := Text[TextTimeText].Text + IntToStr(Sec);
end;
// draw static menu (BG)
|