aboutsummaryrefslogtreecommitdiffstats
path: root/unicode/src/screens/UScreenMain.pas
diff options
context:
space:
mode:
authortobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c>2009-01-12 16:55:45 +0000
committertobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c>2009-01-12 16:55:45 +0000
commit2e66e4bb6719e92c53bcbf40c82bf5d7644719cb (patch)
tree1cbb718dc4aed6b47d6ee38820072994f415fca1 /unicode/src/screens/UScreenMain.pas
parent589f7901a9ab5595dcf026ddee3fd93477f0b46a (diff)
downloadusdx-2e66e4bb6719e92c53bcbf40c82bf5d7644719cb.tar.gz
usdx-2e66e4bb6719e92c53bcbf40c82bf5d7644719cb.tar.xz
usdx-2e66e4bb6719e92c53bcbf40c82bf5d7644719cb.zip
CharCode parameter of ParseInput changed from WideChar to UCS4Char (as some chars might reguire two WideChar).
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/branches/experimental@1565 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'unicode/src/screens/UScreenMain.pas')
-rw-r--r--unicode/src/screens/UScreenMain.pas21
1 files changed, 8 insertions, 13 deletions
diff --git a/unicode/src/screens/UScreenMain.pas b/unicode/src/screens/UScreenMain.pas
index ed8e2170..0909fc8b 100644
--- a/unicode/src/screens/UScreenMain.pas
+++ b/unicode/src/screens/UScreenMain.pas
@@ -49,7 +49,7 @@ type
TextDescriptionLong: integer;
constructor Create; override;
- function ParseInput(PressedKey: cardinal; CharCode: widechar;
+ function ParseInput(PressedKey: Cardinal; CharCode: UCS4Char;
PressedDown: boolean): boolean; override;
procedure onShow; override;
procedure InteractNext; override;
@@ -75,7 +75,7 @@ uses
USkins,
UUnicodeUtils;
-function TScreenMain.ParseInput(PressedKey: cardinal; CharCode: widechar;
+function TScreenMain.ParseInput(PressedKey: Cardinal; CharCode: UCS4Char;
PressedDown: boolean): boolean;
var
SDL_ModState: word;
@@ -88,22 +88,19 @@ begin
if (PressedDown) then
begin // Key Down
// check normal keys
- case WideStringUpperCase(CharCode)[1] of
- 'Q':
- begin
+ case UCS4UpperCase(CharCode) of
+ Ord('Q'): begin
Result := False;
Exit;
end;
- 'C':
- begin
+ Ord('C'): begin
if (SDL_ModState = KMOD_LALT) then
begin
FadeTo(@ScreenCredits, SoundLib.Start);
Exit;
end;
end;
- 'M':
- begin
+ Ord('M'): begin
if (Ini.Players >= 1) and (Length(DLLMan.Plugins) >= 1) then
begin
FadeTo(@ScreenPartyOptions, SoundLib.Start);
@@ -111,14 +108,12 @@ begin
end;
end;
- 'S':
- begin
+ Ord('S'): begin
FadeTo(@ScreenStatMain, SoundLib.Start);
Exit;
end;
- 'E':
- begin
+ Ord('E'): begin
FadeTo(@ScreenEdit, SoundLib.Start);
Exit;
end;