aboutsummaryrefslogtreecommitdiffstats
path: root/unicode/src/screens
diff options
context:
space:
mode:
Diffstat (limited to '')
-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);