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

Method setCursorPos

Engine/source/gui/core/guiCanvas.cpp:542–555  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

540}
541
542void GuiCanvas::setCursorPos(const Point2I &pt)
543{
544 AssertISV(mPlatformWindow, "GuiCanvas::setCursorPos - no window present!");
545
546 if ( mPlatformWindow->isMouseLocked() )
547 {
548 mCursorPt.x = F32( pt.x );
549 mCursorPt.y = F32( pt.y );
550 }
551 else
552 {
553 mPlatformWindow->setCursorPosition(pt.x, pt.y);
554 }
555}
556
557void GuiCanvas::showCursor(bool state)
558{

Callers 2

guiCanvas.cppFile · 0.45
setHLEnabledMethod · 0.45

Calls 2

isMouseLockedMethod · 0.45
setCursorPositionMethod · 0.45

Tested by

no test coverage detected