aboutsummaryrefslogtreecommitdiffstats
path: root/Game/Code/Screens/UScreenSong.pas
diff options
context:
space:
mode:
authortobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c>2008-03-21 15:13:23 +0000
committertobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c>2008-03-21 15:13:23 +0000
commitb08c9047b5cdd5628f45877c90149e3bedd57b89 (patch)
tree9a08f9ed604290801814b8c21327aab6f317263e /Game/Code/Screens/UScreenSong.pas
parent35572be5588c92bff06d21791122175d05819374 (diff)
downloadusdx-b08c9047b5cdd5628f45877c90149e3bedd57b89.tar.gz
usdx-b08c9047b5cdd5628f45877c90149e3bedd57b89.tar.xz
usdx-b08c9047b5cdd5628f45877c90149e3bedd57b89.zip
ParseInput(... ScanCode: byte; ...) -> ParseInput(... CharCode: WideChar; ...)
See: http://trac2.assembla.com/usdx/ticket/35 git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@966 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to '')
-rw-r--r--Game/Code/Screens/UScreenSong.pas16
1 files changed, 8 insertions, 8 deletions
diff --git a/Game/Code/Screens/UScreenSong.pas b/Game/Code/Screens/UScreenSong.pas
index 16432dfa..f1fef22b 100644
--- a/Game/Code/Screens/UScreenSong.pas
+++ b/Game/Code/Screens/UScreenSong.pas
@@ -92,7 +92,7 @@ type
procedure SetScroll4;
procedure SetScroll5;
procedure SetScroll6;
- function ParseInput(PressedKey: Cardinal; ScanCode: byte; PressedDown: Boolean): Boolean; override;
+ function ParseInput(PressedKey: Cardinal; CharCode: WideChar; PressedDown: Boolean): Boolean; override;
function Draw: boolean; override;
procedure GenerateThumbnails();
procedure onShow; override;
@@ -225,25 +225,25 @@ var I, I2: Integer;
// Method for input parsing. If False is returned, GetNextWindow
// should be checked to know the next window to load;
-function TScreenSong.ParseInput(PressedKey: Cardinal; ScanCode: byte; PressedDown: Boolean): Boolean;
+function TScreenSong.ParseInput(PressedKey: Cardinal; CharCode: WideChar; PressedDown: Boolean): Boolean;
var
I: integer;
I2: integer;
// HS: integer; // Auto Removed, Unused Variable
SDL_ModState: Word;
- Letter: Char;
+ Letter: WideChar;
begin
Result := true;
//Song Screen Extensions (Jumpto + Menu)
if (ScreenSongMenu.Visible) then
begin
- Result := ScreenSongMenu.ParseInput(PressedKey, ScanCode, PressedDown);
+ Result := ScreenSongMenu.ParseInput(PressedKey, CharCode, PressedDown);
Exit;
end
else if (ScreenSongJumpto.Visible) then
begin
- Result := ScreenSongJumpto.ParseInput(PressedKey, ScanCode, PressedDown);
+ Result := ScreenSongJumpto.ParseInput(PressedKey, CharCode, PressedDown);
Exit;
end;
@@ -256,7 +256,7 @@ begin
//Jump to Artist/Titel
if (SDL_ModState and KMOD_LALT <> 0) AND (Mode = smNormal) AND (PressedKey >= SDLK_A) AND (PressedKey <= SDLK_Z) then
begin
- Letter := UpCase(Chr(ScanCode));
+ Letter := WideUpperCase(CharCode)[1];
I2 := Length(CatSongs.Song);
//Jump To Titel
@@ -266,7 +266,7 @@ begin
begin
if (CatSongs.Song[(I + Interaction) mod I2].Visible) AND
(Length(CatSongs.Song[(I + Interaction) mod I2].Title)>0) AND
- (widechar(UpperCase(CatSongs.Song[(I + Interaction) mod I2].Title)[1]) = widechar(Letter)) then
+ (WideUpperCase(CatSongs.Song[(I + Interaction) mod I2].Title)[1] = Letter) then
begin
SkipTo(CatSongs.VisibleIndex((I + Interaction) mod I2));
@@ -287,7 +287,7 @@ begin
begin
if (CatSongs.Song[(I + Interaction) mod I2].Visible) AND
(Length(CatSongs.Song[(I + Interaction) mod I2].Artist)>0) AND
- (widechar(uppercase(CatSongs.Song[(I + Interaction) mod I2].Artist)[1]) = widechar(Letter)) then
+ (WideUpperCase(CatSongs.Song[(I + Interaction) mod I2].Artist)[1] = Letter) then
begin
SkipTo(CatSongs.VisibleIndex((I + Interaction) mod I2));