aboutsummaryrefslogtreecommitdiffstats
path: root/Game/Code/Screens/UScreenSongJumpto.pas
diff options
context:
space:
mode:
authorwhiteshark0 <whiteshark0@b956fd51-792f-4845-bead-9b4dfca2ff2c>2007-03-29 12:40:11 +0000
committerwhiteshark0 <whiteshark0@b956fd51-792f-4845-bead-9b4dfca2ff2c>2007-03-29 12:40:11 +0000
commit8d591b8344e0cb87e1a987961b3790fa26d323a6 (patch)
treeb18a29024b31aa4d04283b6692b116c539ba6bc1 /Game/Code/Screens/UScreenSongJumpto.pas
parent92f5f8a835d4a5e6d68bd64057bd5198bf5ca63d (diff)
downloadusdx-8d591b8344e0cb87e1a987961b3790fa26d323a6.tar.gz
usdx-8d591b8344e0cb87e1a987961b3790fa26d323a6.tar.xz
usdx-8d591b8344e0cb87e1a987961b3790fa26d323a6.zip
Fixed Some Bugs in JumpTo Screen:
Now plays correct music Space Bug is gone Added onSentenceChange Procedure to ScreenSing git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@48 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to '')
-rw-r--r--Game/Code/Screens/UScreenSongJumpto.pas41
1 files changed, 38 insertions, 3 deletions
diff --git a/Game/Code/Screens/UScreenSongJumpto.pas b/Game/Code/Screens/UScreenSongJumpto.pas
index 449141c3..2bf0cb5b 100644
--- a/Game/Code/Screens/UScreenSongJumpto.pas
+++ b/Game/Code/Screens/UScreenSongJumpto.pas
@@ -11,10 +11,20 @@ type
Songsfound: String;
NoSongsfound: String;
CatText: String;
+
+ //For ChangeMusic
+ LastPlayed: Integer;
+ VisibleBool: Boolean;
public
- Visible: Boolean; //Whether the Menu should be Drawn
VisSongs: Integer;
+
constructor Create; override;
+
+ //Visible //Whether the Menu should be Drawn
+ //Whether the Menu should be Drawn
+ procedure SetVisible(Value: Boolean);
+ property Visible: Boolean read VisibleBool write SetVisible;
+
function ParseInput(PressedKey: Cardinal; ScanCode: byte; PressedDown: Boolean): Boolean; override;
procedure onShow; override;
function Draw: boolean; override;
@@ -159,12 +169,29 @@ begin
AddText(Theme.SongJumpto.Text[I]);
Interaction := 0;
+ LastPlayed := 0;
+end;
+
+procedure TScreenSongJumpto.SetVisible(Value: Boolean);
+begin
+//If change from unvisible to Visible then OnShow
+ if (VisibleBool = False) AND (Value = True) then
+ OnShow;
+
+ VisibleBool := Value;
end;
procedure TScreenSongJumpto.onShow;
begin
- Interaction := 0;
- SetTextFound(0);
+ //Reset Screen if no Old Search is Displayed
+ if (CatSongs.CatNumShow <> -2) then
+ begin
+ Interaction := 0;
+ SelectType := 0;
+
+ Button[0].Text[0].Text := '';
+ Text[0].Text := NoSongsFound;
+ end;
end;
function TScreenSongJumpto.Draw: boolean;
@@ -189,6 +216,14 @@ begin
ScreenSong.Interaction := 0;
ScreenSong.SelectNext;
ScreenSong.FixSelected;
+
+ //Play Correct Music
+ if (ScreenSong.Interaction <> LastPlayed) then
+ begin
+ LastPlayed := ScreenSong.Interaction;
+
+ ScreenSong.ChangeMusic;
+ end;
end;
end.