------------------------------------------------------------------------------
| 202 | |
| 203 | //------------------------------------------------------------------------------ |
| 204 | void GuiTextCtrl::onRender(Point2I offset, const RectI &updateRect) |
| 205 | { |
| 206 | StringBuffer textBuffer(mText); |
| 207 | |
| 208 | ColorI fontColor = mProfile->mFontColor; |
| 209 | |
| 210 | if (mTruncateWhenUnfocused) |
| 211 | { |
| 212 | StringBuffer terminationString = "..."; |
| 213 | S32 width = mBounds.extent.x; |
| 214 | StringBuffer truncatedBuffer = truncate(textBuffer, terminationString, width); |
| 215 | const UTF8* truncatedBufferPtr = truncatedBuffer.getPtr8(); |
| 216 | |
| 217 | dglSetBitmapModulation(fontColor); |
| 218 | renderJustifiedText(offset, mBounds.extent, (char*)truncatedBufferPtr); |
| 219 | } |
| 220 | else |
| 221 | { |
| 222 | dglSetBitmapModulation(fontColor); |
| 223 | renderJustifiedText(offset, mBounds.extent, (char*)mText); |
| 224 | } |
| 225 | |
| 226 | //render the child controls |
| 227 | renderChildControls(offset, updateRect); |
| 228 | } |
| 229 | |
| 230 | // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- // |
| 231 |
nothing calls this directly
no test coverage detected