From e79530fd2165c92a9291076b05dfb0e0236fc222 Mon Sep 17 00:00:00 2001 From: whiteshark0 Date: Tue, 24 Apr 2007 12:59:54 +0000 Subject: Added ability to Select Players before Song Make Option OnSongClick Work git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@131 b956fd51-792f-4845-bead-9b4dfca2ff2c --- Game/Code/Screens/UScreenMain.pas | 19 +++++++++++++++++++ Game/Code/Screens/UScreenName.pas | 9 ++++++++- Game/Code/Screens/UScreenSong.pas | 23 +++++++++++++++++++++-- Game/Code/Screens/UScreenSongMenu.pas | 2 +- 4 files changed, 49 insertions(+), 4 deletions(-) diff --git a/Game/Code/Screens/UScreenMain.pas b/Game/Code/Screens/UScreenMain.pas index 8d2d13b6..051cd101 100644 --- a/Game/Code/Screens/UScreenMain.pas +++ b/Game/Code/Screens/UScreenMain.pas @@ -147,6 +147,8 @@ begin Music.PlayStart; if (Ini.Players >= 0) and (Ini.Players <= 3) then PlayersPlay := Ini.Players + 1; if (Ini.Players = 4) then PlayersPlay := 6; + + ScreenName.Goto_SingScreen := False; FadeTo(@ScreenName); end; if Interaction = 1 then begin @@ -206,6 +208,23 @@ begin TextDescriptionLong := AddText(Theme.Main.TextDescriptionLong); Interaction := 0; + + //Some Testing for Button Fade + Button[0].SelectH := Button[0].H * 3; + Button[0].Fade := True; + Button[0].FadeText := True; + Button[0].DeSelectReflectionspacing := 280; + + Button[1].SelectH := Button[0].H * 3; + Button[1].Fade := True; + + Button[2].SelectH := Button[0].H * 3; + Button[2].Fade := True; + Button[2].FadeText := True; + + Button[3].SelectH := Button[0].H * 3; + Button[3].Fade := True; + Button[3].FadeText := True; end; procedure TScreenMain.onShow; diff --git a/Game/Code/Screens/UScreenName.pas b/Game/Code/Screens/UScreenName.pas index 82519e87..e8bc2dd8 100644 --- a/Game/Code/Screens/UScreenName.pas +++ b/Game/Code/Screens/UScreenName.pas @@ -8,6 +8,7 @@ uses type TScreenName = class(TMenu) public + Goto_SingScreen: Boolean; //If True then next Screen in SingScreen constructor Create; override; function ParseInput(PressedKey: Cardinal; ScanCode: byte; PressedDown: Boolean): Boolean; override; procedure onShow; override; @@ -49,7 +50,13 @@ begin Ini.Name[I-1] := Button[I-1].Text[0].Text; Ini.SaveNames; Music.PlayStart; - FadeTo(@ScreenLevel); + + if GoTo_SingScreen then + FadeTo(@ScreenSing) + else + FadeTo(@ScreenLevel); + + GoTo_SingScreen := False; end; // Up and Down could be done at the same time, diff --git a/Game/Code/Screens/UScreenSong.pas b/Game/Code/Screens/UScreenSong.pas index 79a5abb1..5814efbf 100644 --- a/Game/Code/Screens/UScreenSong.pas +++ b/Game/Code/Screens/UScreenSong.pas @@ -83,6 +83,7 @@ type procedure StartSong; procedure OpenEditor; procedure DoJoker(Team: Byte); + procedure SelectPlayers; //Extensions procedure DrawExtensions; @@ -299,8 +300,17 @@ begin end else begin // clicked on song if (Mode = 0) then //Normal Mode -> Start Song begin - StartSong; - + //Do the Action that is specified in Ini + case Ini.OnSongClick of + 0: StartSong; + 1: SelectPlayers; + 2:begin + If (CatSongs.CatNumShow = -3) then + ScreenSongMenu.MenuShow(SM_Playlist) + else + ScreenSongMenu.MenuShow(SM_Main); + end; + end; end else if (Mode = 1) then //PartyMode -> Show Menu begin @@ -1615,6 +1625,15 @@ begin end; end; +procedure TScreenSong.SelectPlayers; +begin + CatSongs.Selected := Interaction; + Music.Stop; + + ScreenName.Goto_SingScreen := True; + FadeTo(@ScreenName); +end; + procedure TScreenSong.OpenEditor; begin if (Length(Songs.Song) > 0) and (not CatSongs.Song[Interaction].Main) AND (Mode = 0) then begin diff --git a/Game/Code/Screens/UScreenSongMenu.pas b/Game/Code/Screens/UScreenSongMenu.pas index 3ccba228..699e0b92 100644 --- a/Game/Code/Screens/UScreenSongMenu.pas +++ b/Game/Code/Screens/UScreenSongMenu.pas @@ -368,7 +368,7 @@ begin 1: //Button 2 begin //Select New Players then Sing: - + ScreenSong.SelectPlayers; Visible := False; end; -- cgit v1.2.3