MCPcopy Create free account
hub / github.com/GarageGames/Torque3D / setCursorPosition

Method setCursorPosition

Engine/source/gui/controls/guiMLTextCtrl.cpp:627–644  ·  view source on GitHub ↗

--------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

625
626//--------------------------------------------------------------------------
627bool GuiMLTextCtrl::setCursorPosition(const S32 newPosition)
628{
629 if (newPosition < 0)
630 {
631 mCursorPosition = 0;
632 return true;
633 }
634 else if (newPosition >= mTextBuffer.length() - 1)
635 {
636 mCursorPosition = mTextBuffer.length();
637 return true;
638 }
639 else
640 {
641 mCursorPosition = newPosition;
642 return false;
643 }
644}
645
646//--------------------------------------------------------------------------
647void GuiMLTextCtrl::ensureCursorOnScreen()

Callers 2

setCursorPosMethod · 0.45
guiMLTextCtrl.cppFile · 0.45

Calls 1

lengthMethod · 0.45

Tested by

no test coverage detected