From 4711217f127aa0c10fa52755fd567c570277a1a1 Mon Sep 17 00:00:00 2001 From: s_alexander Date: Tue, 12 Jan 2010 17:42:41 +0000 Subject: merged lua into trunk git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@2071 b956fd51-792f-4845-bead-9b4dfca2ff2c --- src/screens/UScreenSongMenu.pas | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) (limited to 'src/screens/UScreenSongMenu.pas') diff --git a/src/screens/UScreenSongMenu.pas b/src/screens/UScreenSongMenu.pas index ec893c7a..173ac2c8 100644 --- a/src/screens/UScreenSongMenu.pas +++ b/src/screens/UScreenSongMenu.pas @@ -401,16 +401,19 @@ begin begin CurMenu := sMenu; Text[0].Text := Language.Translate('SONG_MENU_NAME_PARTY_JOKER'); - - Button[0].Visible := (PartySession.Teams.NumTeams >= 1) and (PartySession.Teams.Teaminfo[0].Joker > 0); - Button[1].Visible := (PartySession.Teams.NumTeams >= 2) and (PartySession.Teams.Teaminfo[1].Joker > 0); - Button[2].Visible := (PartySession.Teams.NumTeams >= 3) and (PartySession.Teams.Teaminfo[2].Joker > 0); - Button[3].Visible := true; - SelectsS[0].Visible := false; - - Button[0].Text[0].Text := UTF8String(PartySession.Teams.Teaminfo[0].Name); - Button[1].Text[0].Text := UTF8String(PartySession.Teams.Teaminfo[1].Name); - Button[2].Text[0].Text := UTF8String(PartySession.Teams.Teaminfo[2].Name); + // to-do : Party + Button[0].Visible := (Length(Party.Teams) >= 1) AND (Party.Teams[0].JokersLeft > 0); + Button[1].Visible := (Length(Party.Teams) >= 2) AND (Party.Teams[1].JokersLeft > 0); + Button[2].Visible := (Length(Party.Teams) >= 3) AND (Party.Teams[2].JokersLeft > 0); + Button[3].Visible := True; + SelectsS[0].Visible := False; + + if (Button[0].Visible) then + Button[0].Text[0].Text := UTF8String(Party.Teams[0].Name); + if (Button[1].Visible) then + Button[1].Text[0].Text := UTF8String(Party.Teams[1].Name); + if (Button[2].Visible) then + Button[2].Text[0].Text := UTF8String(Party.Teams[2].Name); Button[3].Text[0].Text := Language.Translate('SONG_MENU_CANCEL'); // set right interaction @@ -614,7 +617,7 @@ begin 0: // button 1 begin // start singing - ScreenSong.StartSong; + Party.CallAfterSongSelect; Visible := false; end; -- cgit v1.2.3