MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / onPreRender

Method onPreRender

Engine/source/gui/controls/guiConsoleTextCtrl.cpp:113–130  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

111
112
113void GuiConsoleTextCtrl::onPreRender()
114{
115 if ( mConsoleExpression.isNotEmpty() )
116 {
117 Con::evaluatef( "$guiConsoleTextCtrlTemp = %s;", mConsoleExpression.c_str() );
118
119 //Fixes a bug with the above not always grabbing the console text.
120 mResult = Con::getVariable("$guiConsoleTextCtrlTemp");
121
122 // Of the resulting string we will be printing,
123 // Find the number of lines and length of each.
124 mProfile->mFont->wrapString( mResult, U32_MAX, mStartLineOffset, mLineLen );
125 }
126 else
127 mResult = String::EmptyString;
128
129 calcResize();
130}
131
132void GuiConsoleTextCtrl::onRender( Point2I offset, const RectI &updateRect )
133{

Callers

nothing calls this directly

Calls 5

evaluatefFunction · 0.85
getVariableFunction · 0.85
wrapStringMethod · 0.80
isNotEmptyMethod · 0.45
c_strMethod · 0.45

Tested by

no test coverage detected