aboutsummaryrefslogtreecommitdiffstats
path: root/unicode
diff options
context:
space:
mode:
authortobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c>2009-07-23 15:06:47 +0000
committertobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c>2009-07-23 15:06:47 +0000
commit8cfc0fff4c3f039b65dbfedb290cd211b673a060 (patch)
tree4fa2ed5e31181fe54b1853f83851c994f2b1678a /unicode
parent33c1099799c6d489e849742b5d9fb7f7f6a06c3c (diff)
downloadusdx-8cfc0fff4c3f039b65dbfedb290cd211b673a060.tar.gz
usdx-8cfc0fff4c3f039b65dbfedb290cd211b673a060.tar.xz
usdx-8cfc0fff4c3f039b65dbfedb290cd211b673a060.zip
cleanup
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/branches/experimental@1865 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'unicode')
-rw-r--r--unicode/src/screens/UScreenName.pas5
-rw-r--r--unicode/src/screens/UScreenOpen.pas40
2 files changed, 19 insertions, 26 deletions
diff --git a/unicode/src/screens/UScreenName.pas b/unicode/src/screens/UScreenName.pas
index dc2f14ef..31edfd6b 100644
--- a/unicode/src/screens/UScreenName.pas
+++ b/unicode/src/screens/UScreenName.pas
@@ -76,8 +76,7 @@ begin
+ KMOD_LCTRL + KMOD_RCTRL + KMOD_LALT + KMOD_RALT);
// check normal keys
- if (IsAlphaNumericChar(CharCode) or
- IsPunctuationChar(CharCode)) then
+ if (IsPrintableChar(CharCode)) then
begin
Button[Interaction].Text[0].Text := Button[Interaction].Text[0].Text +
UCS4ToUTF8String(CharCode);
@@ -198,7 +197,7 @@ begin
SDLK_BACKSPACE:
begin
- Button[Interaction].Text[0].DeleteLastLetter;
+ Button[Interaction].Text[0].DeleteLastLetter();
end;
SDLK_ESCAPE :
diff --git a/unicode/src/screens/UScreenOpen.pas b/unicode/src/screens/UScreenOpen.pas
index 718ef546..a25356ec 100644
--- a/unicode/src/screens/UScreenOpen.pas
+++ b/unicode/src/screens/UScreenOpen.pas
@@ -64,8 +64,8 @@ type
constructor Create; override;
procedure onShow; override;
function ParseInput(PressedKey: cardinal; CharCode: UCS4Char; PressedDown: boolean): boolean; override;
-// function Draw: boolean; override;
-// procedure Finish;
+ //function Draw: boolean; override;
+ //procedure Finish;
end;
implementation
@@ -85,26 +85,18 @@ begin
if (PressedDown) then // Key Down
begin
// check normal keys
- case CharCode of
- Ord('0')..Ord('9'),
- Ord('a')..Ord('z'),
- Ord('A')..Ord('Z'),
- Ord(' '), Ord('-'), Ord('.'), Ord(':'), Ord('\'):
- begin
- if Interaction = 0 then
- begin
- Text[TextN].Text := Text[TextN].Text + UCS4ToUTF8String(CharCode);
- end;
- end;
+ if (IsPrintableChar(CharCode)) then
+ begin
+ if (Interaction = 0) then
+ begin
+ Text[TextN].Text := Text[TextN].Text + UCS4ToUTF8String(CharCode);
+ Exit;
+ end;
end;
// check special keys
case PressedKey of
- SDLK_Q:
- begin
- Result := false;
- end;
- 8: // del
+ SDLK_BACKSPACE: // del
begin
if Interaction = 0 then
begin
@@ -170,15 +162,17 @@ begin
inherited Create;
// line
-{ AddStatic(20, 10, 80, 30, 0, 0, 0, 'MainBar', 'JPG', TEXTURE_TYPE_COLORIZED);
+ {
+ AddStatic(20, 10, 80, 30, 0, 0, 0, 'MainBar', 'JPG', TEXTURE_TYPE_COLORIZED);
AddText(35, 17, 1, 18, 1, 1, 1, 'line');
- TextSentence := AddText(120, 14, 1, 24, 0, 0, 0, '0 / 0');}
+ TextSentence := AddText(120, 14, 1, 24, 0, 0, 0, '0 / 0');
+ }
// file list
-// AddBox(400, 100, 350, 450);
+ //AddBox(400, 100, 350, 450);
-// TextF[0] := AddText(430, 155, 0, 24, 0, 0, 0, 'a');
-// TextF[1] := AddText(430, 180, 0, 24, 0, 0, 0, 'a');
+ //TextF[0] := AddText(430, 155, 0, 24, 0, 0, 0, 'a');
+ //TextF[1] := AddText(430, 180, 0, 24, 0, 0, 0, 'a');
// file name
AddBox(20, 540, 500, 40);