diff options
Diffstat (limited to 'unicode/src/screens/UScreenOpen.pas')
-rw-r--r-- | unicode/src/screens/UScreenOpen.pas | 40 |
1 files changed, 17 insertions, 23 deletions
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); |