diff options
author | tobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2008-11-07 20:49:01 +0000 |
---|---|---|
committer | tobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2008-11-07 20:49:01 +0000 |
commit | 17614ea059162f432f7feba5f39329667a335fa6 (patch) | |
tree | aa95668867bf58d6bd708bfcb5b3f9db38dc59f8 /unicode/src/menu/UMenuText.pas | |
parent | e520f12663f97a3ca7e609d0d6f6bf91dc88e675 (diff) | |
download | usdx-17614ea059162f432f7feba5f39329667a335fa6.tar.gz usdx-17614ea059162f432f7feba5f39329667a335fa6.tar.xz usdx-17614ea059162f432f7feba5f39329667a335fa6.zip |
- WideStringUpperCase moved to UUnicodeUtils.pas
- WideCharUpperCase removed as single characters (code-point) can be represented by two WideChars (surrogates). Convert to UCS4 instead (one code-point <-> one UCS4Char).
- UCS4 functions added to UUUnicodeUtils
- string replaced with UTF8String (although it's just a typedef) to mark UTF8 strings.
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/branches/experimental@1507 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'unicode/src/menu/UMenuText.pas')
-rw-r--r-- | unicode/src/menu/UMenuText.pas | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/unicode/src/menu/UMenuText.pas b/unicode/src/menu/UMenuText.pas index 24c7eae6..87f9ce54 100644 --- a/unicode/src/menu/UMenuText.pas +++ b/unicode/src/menu/UMenuText.pas @@ -45,8 +45,8 @@ type TText = class private SelectBool: boolean; - TextString: string; - TextTiles: array of string; + TextString: UTF8String; + TextTiles: array of UTF8String; STicks: Cardinal; SelectBlink: boolean; @@ -75,15 +75,15 @@ type procedure SetSelect(Value: boolean); property Selected: boolean read SelectBool write SetSelect; - procedure SetText(Value: string); - property Text: string read TextString write SetText; + procedure SetText(Value: UTF8String); + property Text: UTF8String read TextString write SetText; procedure DeleteLastLetter; //Procedure to Delete Last Letter procedure Draw; constructor Create; overload; - constructor Create(X, Y: real; Tekst: string); overload; - constructor Create(ParX, ParY, ParW: real; ParStyle: integer; ParSize, ParColR, ParColG, ParColB: real; ParAlign: integer; ParTekst: string; ParReflection: boolean; ParReflectionSpacing: real; ParZ: real); overload; + constructor Create(X, Y: real; const Text: UTF8String); overload; + constructor Create(ParX, ParY, ParW: real; ParStyle: integer; ParSize, ParColR, ParColG, ParColB: real; ParAlign: integer; const ParText: UTF8String; ParReflection: boolean; ParReflectionSpacing: real; ParZ: real); overload; end; implementation @@ -102,7 +102,7 @@ begin STicks := SDL_GetTicks() div 550; end; -procedure TText.SetText(Value: string); +procedure TText.SetText(Value: UTF8String); var NextPos: Cardinal; //NextPos of a Space etc. LastPos: Cardinal; //LastPos " @@ -260,7 +260,7 @@ end; procedure TText.Draw; var X2, Y2: real; - Text2: string; + Text2: UTF8String; I: integer; begin if Visible then @@ -348,12 +348,12 @@ begin Create(0, 0, ''); end; -constructor TText.Create(X, Y: real; Tekst: string); +constructor TText.Create(X, Y: real; const Text: UTF8String); begin - Create(X, Y, 0, 0, 30, 0, 0, 0, 0, Tekst, false, 0, 0); + Create(X, Y, 0, 0, 30, 0, 0, 0, 0, Text, false, 0, 0); end; -constructor TText.Create(ParX, ParY, ParW: real; ParStyle: integer; ParSize, ParColR, ParColG, ParColB: real; ParAlign: integer; ParTekst: string; ParReflection: boolean; ParReflectionSpacing: real; ParZ:real); +constructor TText.Create(ParX, ParY, ParW: real; ParStyle: integer; ParSize, ParColR, ParColG, ParColB: real; ParAlign: integer; const ParText: UTF8String; ParReflection: boolean; ParReflectionSpacing: real; ParZ:real); begin inherited Create; Alpha := 1; @@ -363,7 +363,7 @@ begin Z := ParZ; Style := ParStyle; Size := ParSize; - Text := ParTekst; + Text := ParText; ColR := ParColR; ColG := ParColG; ColB := ParColB; |