aboutsummaryrefslogtreecommitdiffstats
path: root/src/menu/UMenuText.pas
diff options
context:
space:
mode:
authortobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c>2008-10-28 18:57:02 +0000
committertobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c>2008-10-28 18:57:02 +0000
commite8a388e32a4563ac9ea0895ca6c7cdf83cf9d3ec (patch)
tree832c59176b260af0a3e89f058699cec2b9a7dca0 /src/menu/UMenuText.pas
parentc01eba6a6494bb583b5bf43bea404b918b5c9c63 (diff)
downloadusdx-e8a388e32a4563ac9ea0895ca6c7cdf83cf9d3ec.tar.gz
usdx-e8a388e32a4563ac9ea0895ca6c7cdf83cf9d3ec.tar.xz
usdx-e8a388e32a4563ac9ea0895ca6c7cdf83cf9d3ec.zip
- glPrint(Pchar) -> glPrint(string)
- glPrintLetter removed - font engine handles FT_PIXEL_MODE_MONO as FT_Glyph_To_Bitmap(FT_RENDER_MODE_NORMAL) might return a 1bit/pixel black/white image instead of 8bit/pixel gray shaded one (happened with 16px japanese glyphs of simsun.ttf, latin ones were correct). git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1482 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'src/menu/UMenuText.pas')
-rw-r--r--src/menu/UMenuText.pas16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/menu/UMenuText.pas b/src/menu/UMenuText.pas
index 1a7c15a1..5c41eba5 100644
--- a/src/menu/UMenuText.pas
+++ b/src/menu/UMenuText.pas
@@ -200,7 +200,7 @@ begin
if isBreak then
begin
//Look for Break before the Break
- if (glTextWidth(PChar(Copy(Value, LastBreak, NextPos - LastBreak + 1))) > W) AND (NextPos-LastPos > 1) then
+ if (glTextWidth(Copy(Value, LastBreak, NextPos - LastBreak + 1)) > W) AND (NextPos-LastPos > 1) then
begin
isBreak := False;
//Not the First word after Break, so we don't have to break within a word
@@ -221,7 +221,7 @@ begin
AddBreak(LastBreak, NextPos);
end
//Text comes out of the Text Area -> CreateBreak
- else if (glTextWidth(PChar(Copy(Value, LastBreak, NextPos - LastBreak + 1))) > W) then
+ else if (glTextWidth(Copy(Value, LastBreak, NextPos - LastBreak + 1)) > W) then
begin
//Not the First word after Break, so we don't have to break within a word
if (FirstWord > 1) then
@@ -295,12 +295,12 @@ begin
case Align of
0: X2 := X;
- 1: X2 := X - glTextWidth(pchar(Text2))/2;
- 2: X2 := X - glTextWidth(pchar(Text2));
+ 1: X2 := X - glTextWidth(Text2)/2;
+ 2: X2 := X - glTextWidth(Text2);
end;
SetFontPos(X2, Y);
- glPrint(PChar(Text2));
+ glPrint(Text2);
SetFontStyle(0); // reset to default
end
else
@@ -317,15 +317,15 @@ begin
case Align of
0: X2 := X + MoveX;
- 1: X2 := X + MoveX - glTextWidth(pchar(Text2))/2;
- 2: X2 := X + MoveX - glTextWidth(pchar(Text2));
+ 1: X2 := X + MoveX - glTextWidth(Text2)/2;
+ 2: X2 := X + MoveX - glTextWidth(Text2);
end;
SetFontPos(X2, Y2);
SetFontZ(Z);
- glPrint(PChar(Text2));
+ glPrint(Text2);
{if Size >= 10 then
Y2 := Y2 + Size * 0.93