aboutsummaryrefslogtreecommitdiffstats
path: root/unicode/src/screens/UScreenSongJumpto.pas
diff options
context:
space:
mode:
authortobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c>2009-07-23 12:34:07 +0000
committertobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c>2009-07-23 12:34:07 +0000
commit94cefdb78044e0f9996e3032de34b690de98b708 (patch)
treeb858a502ed5f12a02e18c2299e045eb0a757a8b7 /unicode/src/screens/UScreenSongJumpto.pas
parentd1538b5a15a47b54a53e42d1cc7117780ffafd43 (diff)
downloadusdx-94cefdb78044e0f9996e3032de34b690de98b708.tar.gz
usdx-94cefdb78044e0f9996e3032de34b690de98b708.tar.xz
usdx-94cefdb78044e0f9996e3032de34b690de98b708.zip
- revert to 1777
- Ocean.ini and SVN properties are not reverted git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/branches/experimental@1854 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to '')
-rw-r--r--unicode/src/screens/UScreenSongJumpto.pas34
1 files changed, 18 insertions, 16 deletions
diff --git a/unicode/src/screens/UScreenSongJumpto.pas b/unicode/src/screens/UScreenSongJumpto.pas
index 7405742a..b6979f63 100644
--- a/unicode/src/screens/UScreenSongJumpto.pas
+++ b/unicode/src/screens/UScreenSongJumpto.pas
@@ -34,9 +34,9 @@ interface
{$I switches.inc}
uses
+ SDL,
SysUtils,
UMenu,
- SDL,
UDisplay,
UMusic,
UFiles,
@@ -47,20 +47,20 @@ type
TScreenSongJumpto = class(TMenu)
private
//For ChangeMusic
- fLastPlayed: integer;
- fVisible: boolean;
+ fLastPlayed: Integer;
+ fVisible: Boolean;
fSelectType: TSongFilter;
- fVisSongs: integer;
+ fVisSongs: Integer;
- procedure SetTextFound(const Count: cardinal);
+ procedure SetTextFound(Count: Cardinal);
//Visible //Whether the Menu should be Drawn
//Whether the Menu should be Drawn
- procedure SetVisible(Value: boolean);
+ procedure SetVisible(Value: Boolean);
public
constructor Create; override;
- function ParseInput(PressedKey: cardinal; CharCode: UCS4Char; PressedDown: boolean): boolean; override;
+ function ParseInput(PressedKey: Cardinal; CharCode: UCS4Char; PressedDown: Boolean): Boolean; override;
procedure onShow; override;
function Draw: boolean; override;
@@ -80,10 +80,10 @@ uses
ULog,
UUnicodeUtils;
-function TScreenSongJumpto.ParseInput(PressedKey: cardinal; CharCode: UCS4Char; PressedDown: boolean): boolean;
+function TScreenSongJumpto.ParseInput(PressedKey: Cardinal; CharCode: UCS4Char; PressedDown: Boolean): Boolean;
begin
Result := true;
- if (PressedDown) then
+ If (PressedDown) Then
begin // Key Down
// check normal keys
if (IsAlphaNumericChar(CharCode) or
@@ -100,7 +100,7 @@ begin
case PressedKey of
SDLK_BACKSPACE:
begin
- if (Interaction = 0) and (Length(Button[0].Text[0].Text) > 0) then
+ if (Interaction = 0) AND (Length(Button[0].Text[0].Text) > 0) then
begin
Button[0].Text[0].DeleteLastLetter();
SetTextFound(CatSongs.SetFilter(Button[0].Text[0].Text, fSelectType));
@@ -110,9 +110,9 @@ begin
SDLK_RETURN,
SDLK_ESCAPE:
begin
- Visible := false;
+ Visible := False;
AudioPlayback.PlaySound(SoundLib.Back);
- if (fVisSongs = 0) and (Length(Button[0].Text[0].Text) > 0) then
+ if (fVisSongs = 0) AND (Length(Button[0].Text[0].Text) > 0) then
begin
ScreenSong.UnLoadDetailedCover;
Button[0].Text[0].Text := '';
@@ -168,14 +168,15 @@ begin
fSelectType := fltAll;
AddSelectSlide(Theme.SongJumpto.SelectSlideType, PInteger(@fSelectType)^, Theme.SongJumpto.IType);
+
Interaction := 0;
fLastPlayed := 0;
end;
-procedure TScreenSongJumpto.SetVisible(Value: boolean);
+procedure TScreenSongJumpto.SetVisible(Value: Boolean);
begin
//If change from invisible to Visible then OnShow
- if (fVisible = false) and (Value = true) then
+ if (fVisible = False) AND (Value = True) then
OnShow;
fVisible := Value;
@@ -196,7 +197,7 @@ begin
//Select Input
Interaction := 0;
- Button[0].Text[0].Selected := true;
+ Button[0].Text[0].Selected := True;
fLastPlayed := ScreenSong.Interaction;
end;
@@ -206,7 +207,7 @@ begin
Result := inherited Draw;
end;
-procedure TScreenSongJumpto.SetTextFound(const Count: cardinal);
+procedure TScreenSongJumpto.SetTextFound(Count: Cardinal);
begin
if (Count = 0) then
begin
@@ -224,6 +225,7 @@ begin
ScreenSong.ShowCatTLCustom(Format(Theme.SongJumpto.CatText, [Button[0].Text[0].Text]));
end;
+
//Set visSongs
fVisSongs := Count;