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

Method setCursorPosition

Engine/source/gui/controls/guiMLTextCtrl.cpp:631–648  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

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

Callers 2

setCursorPosMethod · 0.45
guiMLTextCtrl.cppFile · 0.45

Calls 1

lengthMethod · 0.45

Tested by

no test coverage detected