aboutsummaryrefslogtreecommitdiffstats
path: root/Lua/src/screens/UScreenOptions.pas
diff options
context:
space:
mode:
authorwhiteshark0 <whiteshark0@b956fd51-792f-4845-bead-9b4dfca2ff2c>2009-12-11 17:34:54 +0000
committerwhiteshark0 <whiteshark0@b956fd51-792f-4845-bead-9b4dfca2ff2c>2009-12-11 17:34:54 +0000
commit1ab628e8ad6c85c8f1b562f10480253ee3e622b7 (patch)
treed21621f68850ecd7762137e1c4387fa15731a811 /Lua/src/screens/UScreenOptions.pas
parent6ec275387c320d3d9a8f5b6fe185687643565b8c (diff)
downloadusdx-1ab628e8ad6c85c8f1b562f10480253ee3e622b7.tar.gz
usdx-1ab628e8ad6c85c8f1b562f10480253ee3e622b7.tar.xz
usdx-1ab628e8ad6c85c8f1b562f10480253ee3e622b7.zip
merged trunk into lua branch
plugin loading is disabled atm because of a bug reading the files (lua may be the reason). Reading the files in usdx and passing the contents to lua may solve this git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/branches/experimental@2019 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to '')
-rw-r--r--Lua/src/screens/UScreenOptions.pas27
1 files changed, 18 insertions, 9 deletions
diff --git a/Lua/src/screens/UScreenOptions.pas b/Lua/src/screens/UScreenOptions.pas
index 10785b86..3a046400 100644
--- a/Lua/src/screens/UScreenOptions.pas
+++ b/Lua/src/screens/UScreenOptions.pas
@@ -34,15 +34,22 @@ interface
{$I switches.inc}
uses
- UMenu, SDL, SysUtils, UDisplay, UMusic, UFiles, UIni, UThemes;
+ SDL,
+ SysUtils,
+ UMenu,
+ UDisplay,
+ UMusic,
+ UFiles,
+ UIni,
+ UThemes;
type
TScreenOptions = class(TMenu)
public
TextDescription: integer;
constructor Create; override;
- function ParseInput(PressedKey: Cardinal; CharCode: WideChar; PressedDown: Boolean): Boolean; override;
- procedure onShow; override;
+ function ParseInput(PressedKey: cardinal; CharCode: UCS4Char; PressedDown: boolean): boolean; override;
+ procedure OnShow; override;
procedure InteractNext; override;
procedure InteractPrev; override;
procedure InteractNextRow; override;
@@ -52,16 +59,18 @@ type
implementation
-uses UGraphic;
+uses
+ UGraphic,
+ UUnicodeUtils;
-function TScreenOptions.ParseInput(PressedKey: Cardinal; CharCode: WideChar; PressedDown: Boolean): Boolean;
+function TScreenOptions.ParseInput(PressedKey: cardinal; CharCode: UCS4Char; PressedDown: boolean): boolean;
begin
Result := true;
- If (PressedDown) Then
+ if (PressedDown) then
begin // Key Down
// check normal keys
- case WideCharUpperCase(CharCode)[1] of
- 'Q':
+ case UCS4UpperCase(CharCode) of
+ Ord('Q'):
begin
Result := false;
Exit;
@@ -181,7 +190,7 @@ begin
Interaction := 0;
end;
-procedure TScreenOptions.onShow;
+procedure TScreenOptions.OnShow;
begin
inherited;
end;