From 697c060de8ee6266d289d60e03e0dd5d0f395b68 Mon Sep 17 00:00:00 2001 From: k-m_schindler Date: Sun, 3 Jan 2016 21:09:25 +0000 Subject: change and prepare main screen git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@3185 b956fd51-792f-4845-bead-9b4dfca2ff2c --- src/screens/UScreenMain.pas | 48 +++++++++++++++++++++++++++++++++------------ 1 file changed, 36 insertions(+), 12 deletions(-) (limited to 'src') diff --git a/src/screens/UScreenMain.pas b/src/screens/UScreenMain.pas index b5e3a8bb..b603fb29 100644 --- a/src/screens/UScreenMain.pas +++ b/src/screens/UScreenMain.pas @@ -64,7 +64,7 @@ type const { start credits after 60 seconds w/o interaction } - TicksUntilCredits = 60 * 1000; + TicksUntilCredits = 5 * 60 * 1000; implementation @@ -79,6 +79,7 @@ uses UParty, UScreenCredits, USkins, + USong, UUnicodeUtils; function TScreenMain.ParseInput(PressedKey: Cardinal; CharCode: UCS4Char; @@ -103,11 +104,8 @@ begin Exit; end; Ord('C'): begin - if (SDL_ModState = KMOD_LALT) then - begin - FadeTo(@ScreenCredits, SoundLib.Start); - Exit; - end; + FadeTo(@ScreenCredits, SoundLib.Start); + Exit; end; Ord('M'): begin if (Ini.Players >= 1) and (Party.ModesAvailable) then @@ -159,6 +157,9 @@ begin SDLK_RETURN: begin + // reset + Party.bPartyGame := false; + //Solo if (Interaction = 0) then begin @@ -181,25 +182,38 @@ begin ScreenPopupError.ShowPopup(Language.Translate('ERROR_NO_SONGS')); end; - //Multi + //Party if Interaction = 1 then begin if (Songs.SongList.Count >= 1) then begin + Party.bPartyGame := true; + FadeTo(@ScreenPartyOptions, SoundLib.Start); end else //show error message, No Songs Loaded ScreenPopupError.ShowPopup(Language.Translate('ERROR_NO_SONGS')); end; - //Stats + //Jukebox if Interaction = 2 then + begin + if (Songs.SongList.Count >= 1) then + begin +// disable for now FadeTo(@ScreenJukeboxPlaylist, SoundLib.Start); + end + else //show error message, No Songs Loaded + ScreenPopupError.ShowPopup(Language.Translate('ERROR_NO_SONGS')); + end; + + //Stats + if Interaction = 3 then begin FadeTo(@ScreenStatMain, SoundLib.Start); end; //Editor - if Interaction = 3 then + if Interaction = 4 then begin {$IFDEF UseMIDIPort} FadeTo(@ScreenEdit, SoundLib.Start); @@ -209,13 +223,19 @@ begin end; //Options - if Interaction = 4 then + if Interaction = 5 then begin FadeTo(@ScreenOptions, SoundLib.Start); end; + //About + if Interaction = 6 then + begin +// disable for now FadeTo(@ScreenAbout, SoundLib.Start); + end; + //Exit - if Interaction = 5 then + if Interaction = 7 then begin Result := false; end; @@ -266,9 +286,11 @@ begin AddButton(Theme.Main.ButtonSolo); AddButton(Theme.Main.ButtonMulti); +// disable for now AddButton(Theme.Main.ButtonJukebox); AddButton(Theme.Main.ButtonStat); AddButton(Theme.Main.ButtonEditor); AddButton(Theme.Main.ButtonOptions); +// disable for now AddButton(Theme.Main.ButtonAbout); AddButton(Theme.Main.ButtonExit); Interaction := 0; @@ -280,6 +302,8 @@ begin SoundLib.StartBgMusic; + ScreenSong.Mode := smNormal; + {** * Clean up TPartyGame here * at the moment there is no better place for this @@ -298,7 +322,7 @@ begin if (UserInteractionTicks + TicksUntilCredits < SDL_GetTicks) then begin FadeTo(@ScreenCredits, SoundLib.Start); - end; + end; end; procedure TScreenMain.SetInteraction(Num: integer); -- cgit v1.2.3