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

Method onPreRender

Engine/source/gui/controls/guiConsoleTextCtrl.cpp:112–129  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

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