aboutsummaryrefslogtreecommitdiffstats
path: root/Game/Code/Screens
diff options
context:
space:
mode:
authorbrunzelchen <brunzelchen@b956fd51-792f-4845-bead-9b4dfca2ff2c>2010-03-01 19:32:49 +0000
committerbrunzelchen <brunzelchen@b956fd51-792f-4845-bead-9b4dfca2ff2c>2010-03-01 19:32:49 +0000
commitf76443329ab6d536326080d14f5565f066ca433f (patch)
tree7e4f585c81d52accb7cf15527fc95a2f4f2793f4 /Game/Code/Screens
parent4ec8eae5229e26b8ee648f5168d9b9c7f4e154eb (diff)
downloadusdx-f76443329ab6d536326080d14f5565f066ca433f.tar.gz
usdx-f76443329ab6d536326080d14f5565f066ca433f.tar.xz
usdx-f76443329ab6d536326080d14f5565f066ca433f.zip
summerizing of highscores in top screen as an option (never, dynamic, always);
top 3 in song menu; ctrl+print for jpg screenshots; git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/branches/1.0.1 Challenge MOD@2164 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'Game/Code/Screens')
-rw-r--r--Game/Code/Screens/UScreenOptionsAdvanced.pas7
-rw-r--r--Game/Code/Screens/UScreenSong.pas67
-rw-r--r--Game/Code/Screens/UScreenTop.pas4
3 files changed, 73 insertions, 5 deletions
diff --git a/Game/Code/Screens/UScreenOptionsAdvanced.pas b/Game/Code/Screens/UScreenOptionsAdvanced.pas
index 730f333f..18182153 100644
--- a/Game/Code/Screens/UScreenOptionsAdvanced.pas
+++ b/Game/Code/Screens/UScreenOptionsAdvanced.pas
@@ -46,7 +46,7 @@ begin
begin
//SelectLoadAnimation Hidden because it is useless atm
//if SelInteraction = 7 then begin
- if SelInteraction = 6 then begin
+ if SelInteraction = 7 then begin
Ini.Save;
Music.PlayBack;
FadeTo(@ScreenOptions);
@@ -60,7 +60,7 @@ begin
begin
//SelectLoadAnimation Hidden because it is useless atm
//if (SelInteraction >= 0) and (SelInteraction <= 6) then begin
- if (SelInteraction >= 0) and (SelInteraction <= 5) then begin
+ if (SelInteraction >= 0) and (SelInteraction <= 6) then begin
Music.PlayOption;
InteractInc;
end;
@@ -69,7 +69,7 @@ begin
begin
//SelectLoadAnimation Hidden because it is useless atm
//if (SelInteraction >= 0) and (SelInteraction <= 6) then begin
- if (SelInteraction >= 0) and (SelInteraction <= 5) then begin
+ if (SelInteraction >= 0) and (SelInteraction <= 6) then begin
Music.PlayOption;
InteractDec;
end;
@@ -94,6 +94,7 @@ begin
AddSelectSlide(Theme.OptionsAdvanced.SelectOnSongClick, Ini.OnSongClick, IOnSongClick);
AddSelect(Theme.OptionsAdvanced.SelectAskbeforeDel, Ini.AskbeforeDel, IAskbeforeDel);
AddSelect(Theme.OptionsAdvanced.SelectPartyPopup, Ini.PartyPopup, IPartyPopup);
+ AddSelect(Theme.OptionsAdvanced.SelectSumPlayers, Ini.SumPlayers, ISumPlayers);
AddButton(Theme.OptionsAdvanced.ButtonExit);
if (Length(Button[0].Text)=0) then
diff --git a/Game/Code/Screens/UScreenSong.pas b/Game/Code/Screens/UScreenSong.pas
index b4ccc795..54dd4563 100644
--- a/Game/Code/Screens/UScreenSong.pas
+++ b/Game/Code/Screens/UScreenSong.pas
@@ -33,6 +33,8 @@ type
TextP2: integer; //for M2-MOD: show actual player-name p2
TextMedley: array[1..4] of integer;
+ TextTop: array[0..2] of integer;
+ StaticTop: integer;
FoundCAT: boolean; //for M2-MOD: a cat is chosen, see whats next...
@@ -141,6 +143,7 @@ type
procedure Refresh; //Refresh Song Sorting
procedure DrawEqualizer;
procedure ChangeMusic;
+ procedure LoadTop;
procedure StartVideoPreview;
//Party Mode
procedure SelectRandomSong;
@@ -1085,6 +1088,12 @@ begin
for I := 1 to 4 do
TextMedley[I] := AddText(Theme.Song.TextMedley[I]);
+ for I := 0 to 2 do
+ TextTop[I] := AddText(Theme.Song.TextTop[I]);
+
+ StaticTop := AddStatic(Theme.Song.StaticTop);
+ Static[StaticTop].Texture.Alpha := 0.5;
+
//for M2-MOD-mode:
TextP1 := AddText(Theme.Song.TextP1);
TextP2 := AddText(Theme.Song.TextP2);
@@ -1788,6 +1797,11 @@ begin
if Ini.Players <= 3 then PlayersPlay := Ini.Players + 1;
if Ini.Players = 4 then PlayersPlay := 6;
+ for I := 0 to 2 do
+ Text[TextTop[I]].Visible := false;
+
+ Static[StaticTop].Visible := false;
+
//Cat Mod etc
if (Ini.Tabs_at_startup = 1) AND (CatSongs.CatNumShow = -1) AND
(PlaylistMan.Mode=0) then
@@ -1935,6 +1949,7 @@ begin
begin
StartVideoPreview;
CoverTime := 0;
+ LoadTop;
end;
SongIndex := -1;
@@ -2214,6 +2229,14 @@ begin
end else
MP3VolumeHandler.changed := false;
+ if MakeMedley or PartyMedley then
+ begin
+ for I := 0 to 2 do
+ Text[TextTop[I]].Visible := false;
+
+ Static[StaticTop].Visible := false;
+ end;
+
DrawExtensions;
end;
@@ -2372,6 +2395,8 @@ end;
//Procedure Change current played Preview
procedure TScreenSong.ChangeMusic;
+var
+ I: integer;
begin
//When Music Preview is avtivated -> then Change Music
if (Ini.PreviewVolume <> 0) then
@@ -2401,6 +2426,48 @@ begin
end else
Music.Stop;
end;
+
+ LoadTop;
+end;
+
+procedure TScreenSong.LoadTop;
+var
+ I: integer;
+begin
+ //Load Top 3
+ if (NOT CatSongs.Song[Interaction].Main) AND (CatSongs.VisibleSongs > 0) and
+ not MakeMedley and not PartyMedley then
+ begin
+ AktSong := CatSongs.Song[Interaction];
+ DataBase.ReadScore(AktSong, 3, {Ini.SumPlayers}0);
+
+ for I := 0 to 2 do
+ begin
+ Text[TextTop[I]].Text := IntToStr(I+1)+'. ';
+ end;
+
+ if Length(AktSong.Score[Ini.Difficulty])>0 then
+ Static[StaticTop].Visible := true
+ else
+ Static[StaticTop].Visible := false;
+
+ for I := 0 to Length(AktSong.Score[Ini.Difficulty])-1 do
+ begin
+ Text[TextTop[I]].Visible := true;
+
+ Text[TextTop[I]].Text := Text[TextTop[I]].Text + AktSong.Score[Ini.Difficulty, I].Name + '\n' +
+ AktSong.Score[Ini.Difficulty, I].Date + ' (' + IntToStr(AktSong.Score[Ini.Difficulty, I].Score) + ')';
+ end;
+
+ for I := Length(AktSong.Score[Ini.Difficulty]) to 2 do
+ Text[TextTop[I]].Visible := false;
+ end else
+ begin
+ for I := 0 to 2 do
+ Text[TextTop[I]].Visible := false;
+
+ Static[StaticTop].Visible := false;
+ end;
end;
procedure TScreenSong.StartVideoPreview;
diff --git a/Game/Code/Screens/UScreenTop.pas b/Game/Code/Screens/UScreenTop.pas
index a7085b36..6279458f 100644
--- a/Game/Code/Screens/UScreenTop.pas
+++ b/Game/Code/Screens/UScreenTop.pas
@@ -172,7 +172,7 @@ begin
if sung then
DataBase.WriteScore(AktSong);
- DataBase.ReadScore(AktSong);
+ DataBase.ReadScore(AktSong, 8, Ini.SumPlayers);
Text[TextArtistTitle].Text := AktSong.Artist + ' - ' + AktSong.Title;
@@ -194,7 +194,7 @@ begin
Text[TextName[I]].Visible := false;
Text[TextScore[I]].Visible := false;
Text[TextDate[I]].Visible := false;
- end;
+ end;
Text[TextLevel].Text := IDifficulty[Ini.Difficulty];