aboutsummaryrefslogtreecommitdiffstats
path: root/Game/Code/Screens/UScreenSong.pas
diff options
context:
space:
mode:
authorwhiteshark0 <whiteshark0@b956fd51-792f-4845-bead-9b4dfca2ff2c>2007-04-06 10:32:24 +0000
committerwhiteshark0 <whiteshark0@b956fd51-792f-4845-bead-9b4dfca2ff2c>2007-04-06 10:32:24 +0000
commit4f7bf28056fefdcd000499c583a47738ce7d9b07 (patch)
treea1f2344c8d5419d4e13622001c19eca9d9b7b8cd /Game/Code/Screens/UScreenSong.pas
parent91411ffa459eaae3d39b8c3cf8127bcdbe308f0c (diff)
downloadusdx-4f7bf28056fefdcd000499c583a47738ce7d9b07.tar.gz
usdx-4f7bf28056fefdcd000499c583a47738ce7d9b07.tar.xz
usdx-4f7bf28056fefdcd000499c583a47738ce7d9b07.zip
Fixed a Bug in Optionsscreen after adding OptionsAdvanced Screen
Added Jump to Title HotKey (Alt + A..Z) Added Playlist Support to Party Mode, Category Only Mode is still buggy. Fixed: Team3 Players are now Hidden when only 2 Teams are Selected git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@67 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to '')
-rw-r--r--Game/Code/Screens/UScreenSong.pas89
1 files changed, 60 insertions, 29 deletions
diff --git a/Game/Code/Screens/UScreenSong.pas b/Game/Code/Screens/UScreenSong.pas
index 6a1df197..2af37dd5 100644
--- a/Game/Code/Screens/UScreenSong.pas
+++ b/Game/Code/Screens/UScreenSong.pas
@@ -89,7 +89,7 @@ type
end;
implementation
-uses UGraphic, UMain, UCovers, math, OpenGL12, Windows, USkins, UDLLManager, UParty, UScreenSongMenu;
+uses UGraphic, UMain, UCovers, math, OpenGL12, Windows, USkins, UDLLManager, UParty, UPlaylist, UScreenSongMenu;
// ***** Public methods ****** //
@@ -198,8 +198,8 @@ begin
SDL_ModState := SDL_GetModState and (KMOD_LSHIFT + KMOD_RSHIFT
+ KMOD_LCTRL + KMOD_RCTRL + KMOD_LALT + KMOD_RALT);
- {//Jump To
- if (SDL_ModState = KMOD_LALT) AND (PressedKey > SDLK_A) AND (PressedKey < SDLK_Z) then
+ //Jump To
+ if (SDL_ModState = KMOD_LALT) AND (Mode = 0) AND (PressedKey > SDLK_A) AND (PressedKey < SDLK_Z) then
begin
Letter := UpCase(Chr(ScanCode));
Log.LogError(Letter);
@@ -208,7 +208,7 @@ begin
begin
if (CatSongs.Song[(I + Interaction) mod I2].Visible) AND (Length(CatSongs.Song[(I + Interaction) mod I2].Title)>0) AND (UpCase(CatSongs.Song[(I + Interaction) mod I2].Title[1]) = Letter) then
begin
- SkipTo(CatSongs.VisibleIndex((I + Interaction) mod I2));
+ SkipTo(2 + CatSongs.VisibleIndex((I + Interaction) mod I2));
Music.PlayChange;
@@ -220,7 +220,7 @@ begin
end;
end;
Exit;
- end; }
+ end;
case PressedKey of
SDLK_ESCAPE :
@@ -312,7 +312,7 @@ begin
SDLK_M: //Show SongMenu
begin
- if Length(Songs.Song) > 0 then 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)
@@ -328,14 +328,14 @@ begin
SDLK_P: //Show Playlist Menu
begin
- if Length(Songs.Song) > 0 then begin
+ if (Length(Songs.Song) > 0) AND (Mode = 0) then begin
ScreenSongMenu.MenuShow(SM_Playlist_Load);
end;
end;
SDLK_J: //Show Jumpto Menu
begin
- if Length(Songs.Song) > 0 then
+ if (Length(Songs.Song) > 0) AND (Mode = 0) then
begin
ScreenSongJumpto.Visible := True;
end;
@@ -1462,34 +1462,65 @@ Procedure TScreenSong.SelectRandomSong;
var
I, I2: Integer;
begin
- repeat
- I2 := Random(high(CatSongs.Song)+1) - low(CatSongs.Song)+1;
- until CatSongs.Song[I2].Main = false;
+ 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
- begin
- if CatSongs.Song[I].Main then
- break;
- end;
- //In I ist jetzt die Kategorie in I2 der Song
+ //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
- //Choose Cat
- CatSongs.ShowCategoryList;
+ //Choose Cat
+ CatSongs.ShowCategoryList;
- //Show Cat in Top Left Mod
- ShowCatTL (I);
+ //Show Cat in Top Left Mod
+ ShowCatTL (I);
+
+ CatSongs.ClickCategoryButton(I);
+ SelectNext;
+
+ //Fix: Not Existing Song selected:
+ if (I+1=I2) then Inc(I2);
+
+ //Choose Song
+ SkipTo(I2-I);
+ end;
+ 1: //One Category Select Category and Select Random Song
+ begin
+ CatSongs.HideCategory(-1);
+ CatSongs.ShowCategory(PlaylistMan.CurPlayList);
+ ShowCatTL(PlaylistMan.CurPlayList);
- CatSongs.ClickCategoryButton(I);
- SelectNext;
+ SelectNext;
+ FixSelected;
- //Fix: Not Existing Song selected:
- if (I+1=I2) then Inc(I2);
+ SkipTo(2+Random(CatSongs.VisibleSongs-1));
+ Music.PlayChange;
+ ChangeMusic;
+ SetScroll4;
+ UpdateLCD;
+ end;
+ 2: //Playlist: Select Playlist and Select Random Song
+ begin
+ PlaylistMan.SetPlayList(PlaylistMan.CurPlayList);
- //Choose Song
- SkipTo(I2-I);
+ SkipTo(2+Random(CatSongs.VisibleSongs-1));
+ Music.PlayChange;
+ ChangeMusic;
+ SetScroll4;
+ UpdateLCD;
+ FixSelected;
+ end;
+ end;
- ChangeMusic;
+ ChangeMusic;
end;
procedure TScreenSong.SetJoker;