mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-15 16:44:36 +00:00
Merge pull request #1400 from Azaezel/development
inspector aug: docs as tooltips
This commit is contained in:
commit
c1a924141e
1 changed files with 28 additions and 0 deletions
|
|
@ -931,6 +931,34 @@ void GuiInspectorField::_setFieldDocs( StringTableEntry docs )
|
||||||
else
|
else
|
||||||
mFieldDocs = docs;
|
mFieldDocs = docs;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
String inDocs(docs);
|
||||||
|
String outDocs("");
|
||||||
|
String outLine("");
|
||||||
|
S32 newline = inDocs.find('\n');
|
||||||
|
if (newline == -1)
|
||||||
|
outDocs = docs;
|
||||||
|
else
|
||||||
|
{
|
||||||
|
U32 uCount = StringUnit::getUnitCount(inDocs, " ");
|
||||||
|
for (U32 i = 0; i < uCount; i++)
|
||||||
|
{
|
||||||
|
String docWord = StringUnit::getUnit(inDocs, i, " ");
|
||||||
|
if (!docWord.isEmpty())
|
||||||
|
outLine += docWord;
|
||||||
|
|
||||||
|
if (outLine.length() > 80)
|
||||||
|
{
|
||||||
|
outLine += "\n";
|
||||||
|
outDocs += outLine;
|
||||||
|
outLine.clear();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
outLine += " ";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
outDocs += String("\n") + outLine;
|
||||||
|
mTooltip = outDocs;
|
||||||
}
|
}
|
||||||
|
|
||||||
void GuiInspectorField::setHeightOverride(bool useOverride, U32 heightOverride)
|
void GuiInspectorField::setHeightOverride(bool useOverride, U32 heightOverride)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue