aboutsummaryrefslogtreecommitdiffstats
path: root/Game/Code
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--Game/Code/Menu/UMenuText.pas20
1 files changed, 14 insertions, 6 deletions
diff --git a/Game/Code/Menu/UMenuText.pas b/Game/Code/Menu/UMenuText.pas
index 0ebaede2..abf3784c 100644
--- a/Game/Code/Menu/UMenuText.pas
+++ b/Game/Code/Menu/UMenuText.pas
@@ -105,7 +105,7 @@ var
end;
procedure AddBreak(const From, bTo: Cardinal);
begin
- if (isBreak) OR (bTo - From > 1) then
+ if (isBreak) OR (bTo - From >= 1) then
begin
Inc(Len);
SetLength (TextTiles, Len);
@@ -122,6 +122,18 @@ begin
//Set TExtstring
TextString := Value;
+ //Set Cursor Visible
+ SelectBlink := True;
+ STicks := GettickCount div 550;
+
+ //Exit if there is no Need to Create Tiles
+ If (W <= 0) and (Pos('\n', Value) = 0) then
+ begin
+ SetLength (TextTiles, 1);
+ TextTiles[0] := Value;
+ Exit;
+ end;
+
//Create Tiles
//Reset Text Array
SetLength (TextTiles, 0);
@@ -133,6 +145,7 @@ begin
LastBreak := 1;
FirstWord := 1;
+
if (W > 0) then
begin
//Set Font Propertys
@@ -140,7 +153,6 @@ begin
SetFontSize(Size);
end;
-
//go Through Text
While (GetNextPos) do
begin
@@ -186,10 +198,6 @@ begin
end;
//Add Ending
AddBreak(LastBreak, Length(Value)+1);
-
- //Set Cursor Visible
- SelectBlink := True;
- STicks := GettickCount div 550;
end;
Procedure TText.DeleteLastL;