MCPcopy Create free account
hub / github.com/GarageGames/Torque2D / execConsoleCallback

Method execConsoleCallback

engine/source/gui/guiTextEditCtrl.cc:153–167  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

151}
152
153void GuiTextEditCtrl::execConsoleCallback()
154{
155 // Execute the console command!
156 if ( mConsoleCommand[0] )
157 {
158 char buf[16];
159 dSprintf( buf, sizeof( buf ), "%d", getId() );
160 Con::setVariable( "$ThisControl", buf );
161 Con::evaluate( mConsoleCommand, false );
162 }
163
164 // Update the console variable:
165 if ( mConsoleVariable[0] )
166 Con::setVariable( mConsoleVariable, mTextBuffer.getPtr8() );
167}
168
169void GuiTextEditCtrl::updateHistory( StringBuffer *inTxt, bool moveIndex )
170{

Callers

nothing calls this directly

Calls 4

setVariableFunction · 0.85
evaluateFunction · 0.85
getPtr8Method · 0.80
dSprintfFunction · 0.50

Tested by

no test coverage detected