| 129 | } |
| 130 | |
| 131 | void GuiConsoleTextCtrl::onRender( Point2I offset, const RectI &updateRect ) |
| 132 | { |
| 133 | RectI ctrlRect( offset, getExtent() ); |
| 134 | |
| 135 | // if opaque, fill the update rect with the fill color |
| 136 | if ( mProfile->mOpaque ) |
| 137 | GFX->getDrawUtil()->drawRectFill( ctrlRect, mProfile->mFillColor ); |
| 138 | |
| 139 | // if there's a border, draw the border |
| 140 | if ( mProfile->mBorder ) |
| 141 | renderBorder( ctrlRect, mProfile ); |
| 142 | |
| 143 | // If we have text to render. |
| 144 | if ( mResult.isNotEmpty() ) |
| 145 | { |
| 146 | GFont *font = mProfile->mFont; |
| 147 | |
| 148 | GFX->getDrawUtil()->setBitmapModulation( mProfile->mFontColor ); |
| 149 | |
| 150 | for ( U32 i = 0; i < mLineLen.size(); i++ ) |
| 151 | { |
| 152 | Point2I tempOffset = offset; |
| 153 | tempOffset += mProfile->mTextOffset; |
| 154 | tempOffset.y += i * font->getHeight(); |
| 155 | |
| 156 | const UTF8 *line = mResult.c_str() + mStartLineOffset[i]; |
| 157 | U32 lineLen = mLineLen[i]; |
| 158 | GFX->getDrawUtil()->drawTextN( font, tempOffset, line, lineLen, mProfile->mFontColors ); |
| 159 | } |
| 160 | } |
| 161 | |
| 162 | // render the child controlsmResult |
| 163 | renderChildControls(offset, updateRect); |
| 164 | } |
| 165 | |
| 166 | const char *GuiConsoleTextCtrl::getScriptValue() |
| 167 | { |
nothing calls this directly
no test coverage detected