diff options
author | tobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2008-11-06 00:10:46 +0000 |
---|---|---|
committer | tobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2008-11-06 00:10:46 +0000 |
commit | e520f12663f97a3ca7e609d0d6f6bf91dc88e675 (patch) | |
tree | cb9d138b9d89caeae5b2cea644b56f41d2d059c5 /unicode/src/screens/UScreenName.pas | |
parent | f91602a117ca03e9237f041953a462716c4c43f8 (diff) | |
download | usdx-e520f12663f97a3ca7e609d0d6f6bf91dc88e675.tar.gz usdx-e520f12663f97a3ca7e609d0d6f6bf91dc88e675.tar.xz usdx-e520f12663f97a3ca7e609d0d6f6bf91dc88e675.zip |
- IsNumericChar/... and other character class type functions moved to UUnicodeUtils.pas
- UCS4 to UTF8 converters added. Nice for changing single characters (e.g. MyString[i] := 'de')
- Player names are now UTF8
- DeleteLastLetter is UTF8 now
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/branches/experimental@1504 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to '')
-rw-r--r-- | unicode/src/screens/UScreenName.pas | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/unicode/src/screens/UScreenName.pas b/unicode/src/screens/UScreenName.pas index dd11b882..3debabc3 100644 --- a/unicode/src/screens/UScreenName.pas +++ b/unicode/src/screens/UScreenName.pas @@ -34,7 +34,13 @@ interface {$I switches.inc} uses - UMenu, SDL, UDisplay, UMusic, UFiles, SysUtils, UThemes; + UMenu, + UDisplay, + UMusic, + UFiles, + SDL, + SysUtils, + UThemes; type TScreenName = class(TMenu) @@ -48,7 +54,12 @@ type implementation -uses UGraphic, UMain, UIni, UTexture, UCommon; +uses + UGraphic, + UMain, + UIni, + UTexture, + UUnicodeUtils; function TScreenName.ParseInput(PressedKey: Cardinal; CharCode: WideChar; PressedDown: Boolean): Boolean; @@ -65,9 +76,10 @@ begin // check normal keys if (IsAlphaNumericChar(CharCode) or - {(CharCode in [' ','-','_','!',',','<','/','*','?','''','"']))} IsPunctuationChar(CharCode)) then + IsPunctuationChar(CharCode)) then begin - Button[Interaction].Text[0].Text := Button[Interaction].Text[0].Text + CharCode; + Button[Interaction].Text[0].Text := Button[Interaction].Text[0].Text + + UTF8Encode(CharCode); Exit; end; @@ -186,7 +198,7 @@ begin SDLK_BACKSPACE: begin - Button[Interaction].Text[0].DeleteLastL; + Button[Interaction].Text[0].DeleteLastLetter; end; SDLK_ESCAPE : |