--------------------------------------------------------------------------
| 603 | |
| 604 | //-------------------------------------------------------------------------- |
| 605 | void GuiMLTextCtrl::addText(const char* textBuffer, const U32 numChars, bool reformat) |
| 606 | { |
| 607 | if(numChars >= mMaxBufferSize) |
| 608 | return; |
| 609 | |
| 610 | FrameTemp<UTF8> tmp(numChars+1); |
| 611 | dStrncpy(tmp, textBuffer, numChars); |
| 612 | tmp[numChars] = 0; |
| 613 | |
| 614 | mTextBuffer.append(tmp); |
| 615 | |
| 616 | //after setting text, always set the cursor to the beginning |
| 617 | if (reformat) |
| 618 | { |
| 619 | setCursorPosition(0); |
| 620 | clearSelection(); |
| 621 | mDirty = true; |
| 622 | scrollToTop(); |
| 623 | } |
| 624 | } |
| 625 | |
| 626 | //-------------------------------------------------------------------------- |
| 627 | bool GuiMLTextCtrl::setCursorPosition(const S32 newPosition) |
no test coverage detected