aboutsummaryrefslogtreecommitdiffstats
path: root/Game
diff options
context:
space:
mode:
authorwhiteshark0 <whiteshark0@b956fd51-792f-4845-bead-9b4dfca2ff2c>2007-05-09 16:45:46 +0000
committerwhiteshark0 <whiteshark0@b956fd51-792f-4845-bead-9b4dfca2ff2c>2007-05-09 16:45:46 +0000
commit48e9a9faea54c6fa5b2b98e242444ae4c0183a7a (patch)
tree86dfcabc04d5c7b23d9113b8c6347711db6a6c96 /Game
parente0b0396acf6101acf2608d9fe4b36fa735196b2a (diff)
downloadusdx-48e9a9faea54c6fa5b2b98e242444ae4c0183a7a.tar.gz
usdx-48e9a9faea54c6fa5b2b98e242444ae4c0183a7a.tar.xz
usdx-48e9a9faea54c6fa5b2b98e242444ae4c0183a7a.zip
Fix: Readded ability to close the Window
Fix: Crash when SongScreen is opened in PartyMode when Tabs = On. Caused by SelectRandomSong procedure Upd: M in SongScreen works now in PartyMode, too git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@184 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'Game')
-rw-r--r--Game/Code/Classes/UMain.pas6
-rw-r--r--Game/Code/Screens/UScreenSong.pas85
2 files changed, 49 insertions, 42 deletions
diff --git a/Game/Code/Classes/UMain.pas b/Game/Code/Classes/UMain.pas
index 29ca5fcb..47860198 100644
--- a/Game/Code/Classes/UMain.pas
+++ b/Game/Code/Classes/UMain.pas
@@ -145,7 +145,11 @@ Begin
Begin
// beep;
Case Event.type_ Of
- SDL_QUITEV: done := true;
+ SDL_QUITEV: begin
+ Display.Fade := 0;
+ Display.NextScreenWithCheck := nil;
+ Display.CheckOK := True;
+ end;
{ SDL_MOUSEBUTTONDOWN:
With Event.button Do
Begin
diff --git a/Game/Code/Screens/UScreenSong.pas b/Game/Code/Screens/UScreenSong.pas
index 296b6d2f..3f733210 100644
--- a/Game/Code/Screens/UScreenSong.pas
+++ b/Game/Code/Screens/UScreenSong.pas
@@ -357,17 +357,20 @@ begin
SDLK_M: //Show SongMenu
begin
- if (Length(Songs.Song) > 0) AND (Mode = 0) then begin
- if not CatSongs.Song[Interaction].Main then begin // clicked on Song
- if CatSongs.CatNumShow = -3 then
- ScreenSongMenu.MenuShow(SM_Playlist)
+ if (Length(Songs.Song) > 0) then begin
+ if (Mode = 0) then begin
+ if not CatSongs.Song[Interaction].Main then begin // clicked on Song
+ if CatSongs.CatNumShow = -3 then
+ ScreenSongMenu.MenuShow(SM_Playlist)
+ else
+ ScreenSongMenu.MenuShow(SM_Main);
+ end
else
- ScreenSongMenu.MenuShow(SM_Main);
- end
- else
- begin
- ScreenSongMenu.MenuShow(SM_Playlist_Load);
- end;
+ begin
+ ScreenSongMenu.MenuShow(SM_Playlist_Load);
+ end;
+ end //Party Mode -> Show Party Menu
+ else ScreenSongMenu.MenuShow(SM_Party_Main);
end;
end;
@@ -1506,32 +1509,37 @@ begin
Case PlaylistMan.Mode of
0: //All Songs Just Select Random Song
begin
- repeat
- I2 := Random(high(CatSongs.Song)+1) - low(CatSongs.Song)+1;
- until CatSongs.Song[I2].Main = false;
-
- //Search Cat
- for I := I2 downto low(CatSongs.Song) do
+ //When Tabs are activated then use Tab Method
+ if (Ini.Tabs_at_startup = 1) then
begin
- if CatSongs.Song[I].Main then
- break;
- end;
- //In I ist jetzt die Kategorie in I2 der Song
+ repeat
+ I2 := Random(high(CatSongs.Song)+1) - low(CatSongs.Song)+1;
+ until CatSongs.Song[I2].Main = false;
- //Choose Cat
- CatSongs.ShowCategoryList;
+ //Search Cat
+ for I := I2 downto low(CatSongs.Song) do
+ begin
+ if CatSongs.Song[I].Main then
+ break;
+ end;
+ //In I ist jetzt die Kategorie in I2 der Song
+ //I is the CatNum, I2 is the No of the Song within this Cat
- //Show Cat in Top Left Mod
- ShowCatTL (I);
+ //Choose Cat
+ CatSongs.ShowCategoryList;
- CatSongs.ClickCategoryButton(I);
- SelectNext;
+ //Show Cat in Top Left Mod
+ ShowCatTL (I);
- //Fix: Not Existing Song selected:
- //if (I+1=I2) then Inc(I2);
+ CatSongs.ClickCategoryButton(I);
+ SelectNext;
- //Choose Song
- SkipTo(I2-I);
+ //Choose Song
+ SkipTo(I2-I);
+ end
+ //When Tabs are deactivated use easy Method
+ else
+ SkipTo(Random(CatSongs.VisibleSongs));
end;
1: //One Category Select Category and Select Random Song
begin
@@ -1540,28 +1548,23 @@ begin
ShowCatTL(PlaylistMan.CurPlayList);
SelectNext;
- FixSelected;
+ FixSelected2;
SkipTo(Random(CatSongs.VisibleSongs));
- Music.PlayChange;
- ChangeMusic;
- SetScroll4;
- UpdateLCD;
end;
2: //Playlist: Select Playlist and Select Random Song
begin
PlaylistMan.SetPlayList(PlaylistMan.CurPlayList);
SkipTo(Random(CatSongs.VisibleSongs));
- Music.PlayChange;
- ChangeMusic;
- SetScroll4;
- UpdateLCD;
- FixSelected;
+ FixSelected2;
end;
end;
- ChangeMusic;
+ Music.PlayChange;
+ ChangeMusic;
+ SetScroll;
+ UpdateLCD;
end;
procedure TScreenSong.SetJoker;