diff options
author | whiteshark0 <whiteshark0@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2007-05-18 19:31:55 +0000 |
---|---|---|
committer | whiteshark0 <whiteshark0@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2007-05-18 19:31:55 +0000 |
commit | f0e4ad452891aec64c777c4bf806fc6f989ee327 (patch) | |
tree | 1ee05cafa80145ec4e1fdfea4adc75957bc7d219 /Game/Code/Screens/UScreenSongJumpto.pas | |
parent | ab2634e9b83cb44ad7d5a8b54a397b8c22a78778 (diff) | |
download | usdx-f0e4ad452891aec64c777c4bf806fc6f989ee327.tar.gz usdx-f0e4ad452891aec64c777c4bf806fc6f989ee327.tar.xz usdx-f0e4ad452891aec64c777c4bf806fc6f989ee327.zip |
Some Code Cleanup and Minor Bugfixes in UScreenSongJumpto
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@222 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'Game/Code/Screens/UScreenSongJumpto.pas')
-rw-r--r-- | Game/Code/Screens/UScreenSongJumpto.pas | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/Game/Code/Screens/UScreenSongJumpto.pas b/Game/Code/Screens/UScreenSongJumpto.pas index cfb897a8..2ea94cdc 100644 --- a/Game/Code/Screens/UScreenSongJumpto.pas +++ b/Game/Code/Screens/UScreenSongJumpto.pas @@ -84,27 +84,23 @@ begin SDLK_BACKSPACE:
begin
- if Interaction = 0 then
+ if (Interaction = 0) AND (Length(Button[0].Text[0].Text) > 0) then
begin
Button[0].Text[0].DeleteLastL;
SetTextFound(CatSongs.SetFilter(Button[0].Text[0].Text, SelectType));
end;
end;
- SDLK_ESCAPE :
- begin
- Music.PlayBack;
- Visible := False;
- if VisSongs = 0 then
- CatSongs.SetFilter('', 0);
- end;
-
- SDLK_RETURN:
+ SDLK_RETURN, SDLK_ESCAPE:
begin
Visible := False;
Music.PlayBack;
- if VisSongs = 0 then
+ if (VisSongs = 0) AND (Length(Button[0].Text[0].Text) > 0) then
+ begin
+ Button[0].Text[0].Text := '';
CatSongs.SetFilter('', 0);
+ SetTextFound(0);
+ end;
end;
// Up and Down could be done at the same time,
@@ -127,7 +123,8 @@ begin if (Interaction=1) then
begin
InteractInc;
- SetTextFound(CatSongs.SetFilter(Button[0].Text[0].Text, SelectType));
+ if (Length(Button[0].Text[0].Text) > 0) then
+ SetTextFound(CatSongs.SetFilter(Button[0].Text[0].Text, SelectType));
end;
end;
SDLK_LEFT:
@@ -135,7 +132,8 @@ begin if (Interaction=1) then
begin
InteractDec;
- SetTextFound(CatSongs.SetFilter(Button[0].Text[0].Text, SelectType));
+ if (Length(Button[0].Text[0].Text) > 0) then
+ SetTextFound(CatSongs.SetFilter(Button[0].Text[0].Text, SelectType));
end;
end;
end;
@@ -178,7 +176,7 @@ begin //Reset Screen if no Old Search is Displayed
if (CatSongs.CatNumShow <> -2) then
begin
- SelectType := 0;
+ SelectsS[0].SetSelectOpt(0);
Button[0].Text[0].Text := '';
Text[0].Text := Theme.SongJumpto.NoSongsFound;
@@ -201,7 +199,10 @@ begin if (Count = 0) then
begin
Text[0].Text := Theme.SongJumpto.NoSongsFound;
- ScreenSong.HideCatTL;
+ if (Length(Button[0].Text[0].Text) = 0) then
+ ScreenSong.HideCatTL
+ else
+ ScreenSong.ShowCatTLCustom(Format(Theme.SongJumpto.CatText, [Button[0].Text[0].Text]));
end
else
begin
|