aboutsummaryrefslogtreecommitdiffstats
path: root/Game/Code/Classes/UPlaylist.pas
diff options
context:
space:
mode:
authorbrunzelchen <brunzelchen@b956fd51-792f-4845-bead-9b4dfca2ff2c>2010-05-22 22:40:14 +0000
committerbrunzelchen <brunzelchen@b956fd51-792f-4845-bead-9b4dfca2ff2c>2010-05-22 22:40:14 +0000
commit839110b8abea8b835e1865c55b2f5ac3b6e17dc2 (patch)
tree2ef7b131baeaa254e8590b5b00e06bab87644e53 /Game/Code/Classes/UPlaylist.pas
parent1da83f81361aedca04a91e81e5e3a817681ca8cf (diff)
downloadusdx-839110b8abea8b835e1865c55b2f5ac3b6e17dc2.tar.gz
usdx-839110b8abea8b835e1865c55b2f5ac3b6e17dc2.tar.xz
usdx-839110b8abea8b835e1865c55b2f5ac3b6e17dc2.zip
changing tabs or sorting in song screen: info popup with actual sorting; the focus will remain on the actual song.
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/branches/1.0.1 Challenge MOD@2399 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'Game/Code/Classes/UPlaylist.pas')
-rw-r--r--Game/Code/Classes/UPlaylist.pas32
1 files changed, 18 insertions, 14 deletions
diff --git a/Game/Code/Classes/UPlaylist.pas b/Game/Code/Classes/UPlaylist.pas
index e3f68239..3c15e893 100644
--- a/Game/Code/Classes/UPlaylist.pas
+++ b/Game/Code/Classes/UPlaylist.pas
@@ -34,6 +34,7 @@ type
constructor Create;
Procedure LoadPlayLists;
+ Function FindSong(Artist, Title: String): Integer;
Function LoadPlayList(Index: Cardinal; Filename: String): Boolean;
Procedure SavePlayList(Index: Cardinal);
@@ -93,6 +94,23 @@ begin
end;
end;
+Function TPlayListManager.FindSong(Artist, Title: String): Integer;
+var
+ I: Integer;
+
+begin
+ Result := -1;
+
+ For I := low(CatSongs.Song) to high(CatSongs.Song) do
+ begin
+ if (CatSongs.Song[I].Title = Title) AND (CatSongs.Song[I].Artist = Artist) then
+ begin
+ Result := I;
+ Break;
+ end;
+ end;
+end;
+
//----------
//LoadPlayList - Load a Playlist in the Array
//----------
@@ -104,20 +122,6 @@ Function TPlayListManager.LoadPlayList(Index: Cardinal; Filename: String): Bo
SongID: Integer;
Len: Integer;
- Function FindSong(Artist, Title: String): Integer;
- var I: Integer;
- begin
- Result := -1;
-
- For I := low(CatSongs.Song) to high(CatSongs.Song) do
- begin
- if (CatSongs.Song[I].Title = Title) AND (CatSongs.Song[I].Artist = Artist) then
- begin
- Result := I;
- Break;
- end;
- end;
- end;
begin
if not FileExists(PlayListPath + Filename) then
begin