From 632764b05d455fbb396ba65a799ed4f5e3cc36ae Mon Sep 17 00:00:00 2001 From: whiteshark0 Date: Mon, 4 May 2009 07:31:23 +0000 Subject: added calls for party modes functions to ScreenSing clear party settings in UScreenMain, this is some workaround, because this is the only screen that is surely visited after party game git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/branches/experimental@1710 b956fd51-792f-4845-bead-9b4dfca2ff2c --- Lua/src/screens/UScreenMain.pas | 13 ++++++++++--- Lua/src/screens/UScreenSing.pas | 7 ++++++- 2 files changed, 16 insertions(+), 4 deletions(-) (limited to 'Lua') diff --git a/Lua/src/screens/UScreenMain.pas b/Lua/src/screens/UScreenMain.pas index c0ab494e..c590930c 100644 --- a/Lua/src/screens/UScreenMain.pas +++ b/Lua/src/screens/UScreenMain.pas @@ -233,9 +233,16 @@ end; procedure TScreenMain.onShow; begin inherited; -{** - * Start background music - *} + + {** + * Clean up TPartyGame here + * at the moment there is no better place for this + *} + Party.Clear; + + {** + * Start background music + *} SoundLib.StartBgMusic; end; diff --git a/Lua/src/screens/UScreenSing.pas b/Lua/src/screens/UScreenSing.pas index 001fa8a3..1993c331 100644 --- a/Lua/src/screens/UScreenSing.pas +++ b/Lua/src/screens/UScreenSing.pas @@ -135,6 +135,7 @@ uses UGraphic, URecord, ULanguage, UDisplay, + UParty, Math; // Method for input parsing. If False is returned, GetNextWindow @@ -615,6 +616,9 @@ begin if Lines[0].Line[P].TotalNotes = 0 then Inc(NumEmptySentences); + ClearSettings; + Party.CallBeforeSing; + Log.LogStatus('End', 'onShow'); end; @@ -770,7 +774,6 @@ begin begin Finish; FadeOut := True; - FadeTo(@ScreenScore); end; end; end; @@ -847,6 +850,8 @@ begin end; SetFontItalic(False); + + Party.CallAfterSing; end; procedure TScreenSing.OnSentenceEnd(SentenceIndex: cardinal); -- cgit v1.2.3