From 5270a02d1dea4f660349f0414d63c3b969def187 Mon Sep 17 00:00:00 2001 From: whiteshark0 Date: Tue, 8 May 2007 19:23:02 +0000 Subject: Added Ability to Leave Song Screen in Party Mode with Popup. Show Menu directly in Songscreen in PartyMode git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@181 b956fd51-792f-4845-bead-9b4dfca2ff2c --- Game/Code/Screens/UScreenSong.pas | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'Game/Code/Screens') diff --git a/Game/Code/Screens/UScreenSong.pas b/Game/Code/Screens/UScreenSong.pas index 139d6984..296b6d2f 100644 --- a/Game/Code/Screens/UScreenSong.pas +++ b/Game/Code/Screens/UScreenSong.pas @@ -63,6 +63,7 @@ type function ParseInput(PressedKey: Cardinal; ScanCode: byte; PressedDown: Boolean): Boolean; override; function Draw: boolean; override; procedure onShow; override; + procedure onHide; override; procedure SelectNext; procedure SelectPrev; procedure UpdateLCD; @@ -298,6 +299,12 @@ begin // Music.Open(Skin.SkinPath + 'Menu Music 3.mp3'); // Music.Play; end; + end + //When in party Mode then Ask before Close + else if (Mode = 1) then + begin + Music.PlayBack; + CheckFadeTo(@ScreenMain,'MSG_END_PARTY'); end; end; SDLK_RETURN: @@ -1198,12 +1205,21 @@ begin //Party Mode else if (Mode = 1) then begin + SelectRandomSong; + //Show Mennu direct in PartyMode + ScreenSongMenu.MenuShow(SM_Party_Main); end; SetJoker; end; +procedure TScreenSong.onHide; +begin + //When hide then Stop Music (For Party Mode Popup on Exit) + Music.Stop; +end; + procedure TScreenSong.DrawExtensions; begin //Draw Song Menu @@ -1631,7 +1647,7 @@ end; procedure TScreenSong.StartSong; begin CatSongs.Selected := Interaction; - Music.Stop; + //Music.Stop; //Party Mode if (Mode = 1) then begin -- cgit v1.2.3