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