| 1255 | } |
| 1256 | |
| 1257 | void 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 | |
| 1283 | void GuiTextEditCtrl::onPreRender() |
| 1284 | { |
nothing calls this directly
no test coverage detected