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

Method onRender

Engine/source/gui/controls/guiTextEditCtrl.cpp:1257–1281  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1255}
1256
1257void GuiTextEditCtrl::onRender( Point2I offset, const RectI &updateRect )
1258{
1259 RectI ctrlRect( offset, getExtent() );
1260
1261 //if opaque, fill the update rect with the fill color
1262 if ( mProfile->mOpaque )
1263 {
1264 if ( !mTextValid )
1265 GFX->getDrawUtil()->drawRectFill( ctrlRect, mProfile->mFillColorERR );
1266 else if ( isFirstResponder() )
1267 GFX->getDrawUtil()->drawRectFill( ctrlRect, mProfile->mFillColorHL );
1268 else
1269 GFX->getDrawUtil()->drawRectFill( ctrlRect, mProfile->mFillColor );
1270 }
1271
1272 //if there's a border, draw the border
1273 if ( mProfile->mBorder )
1274 {
1275 renderBorder( ctrlRect, mProfile );
1276 if ( !mTextValid )
1277 GFX->getDrawUtil()->drawRectFill( ctrlRect, mProfile->mFillColorERR );
1278 }
1279
1280 drawText( ctrlRect, isFirstResponder() );
1281}
1282
1283void GuiTextEditCtrl::onPreRender()
1284{

Callers

nothing calls this directly

Calls 3

renderBorderFunction · 0.85
drawRectFillMethod · 0.80
getDrawUtilMethod · 0.80

Tested by

no test coverage detected