mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-27 10:33:50 +00:00
Merges in Monkey's fixes PR with a resolution for a conflict
This commit is contained in:
commit
bedc79aacb
22 changed files with 131 additions and 74 deletions
|
|
@ -568,6 +568,7 @@ void GFont::wrapString(const UTF8 *txt, U32 lineWidth, Vector<U32> &startLineOff
|
|||
|
||||
for (U32 i = 0; i < len;)
|
||||
{
|
||||
U32 wide = 0;
|
||||
startLine = i;
|
||||
startLineOffset.push_back(startLine);
|
||||
|
||||
|
|
@ -584,6 +585,10 @@ void GFont::wrapString(const UTF8 *txt, U32 lineWidth, Vector<U32> &startLineOff
|
|||
else if(isValidChar(txt[i]))
|
||||
{
|
||||
lineStrWidth += getCharInfo(txt[i]).xIncrement;
|
||||
if(txt[i] < 0) // symbols which code > 127
|
||||
{
|
||||
wide++; i++;
|
||||
}
|
||||
if( lineStrWidth > lineWidth )
|
||||
{
|
||||
needsNewLine = true;
|
||||
|
|
@ -595,7 +600,7 @@ void GFont::wrapString(const UTF8 *txt, U32 lineWidth, Vector<U32> &startLineOff
|
|||
if (!needsNewLine)
|
||||
{
|
||||
// we are done!
|
||||
lineLen.push_back(i - startLine);
|
||||
lineLen.push_back(i - startLine - wide);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -628,7 +633,7 @@ void GFont::wrapString(const UTF8 *txt, U32 lineWidth, Vector<U32> &startLineOff
|
|||
}
|
||||
}
|
||||
|
||||
lineLen.push_back(j - startLine);
|
||||
lineLen.push_back(j - startLine - wide);
|
||||
i = j;
|
||||
|
||||
// Now we need to increment through any space characters at the
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue