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

Method onMiddleMouseDown

Engine/source/gui/worldEditor/editTSCtrl.cpp:547–578  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

545}
546
547void EditTSCtrl::onMiddleMouseDown(const GuiEvent & event)
548{
549 mMiddleMouseDown = true;
550 mMiddleMouseTriggered = false;
551 mLastBorderMoveTime = 0;
552
553 if(!mLeftMouseDown && !mRightMouseDown && mMiddleMousePassThru && mProfile->mCanKeyFocus)
554 {
555 GuiCanvas *pCanvas = getRoot();
556 if( !pCanvas )
557 return;
558
559 PlatformWindow *pWindow = static_cast<GuiCanvas*>(getRoot())->getPlatformWindow();
560 if( !pWindow )
561 return;
562
563 PlatformCursorController *pController = pWindow->getCursorController();
564 if( !pController )
565 return;
566
567 // ok, gotta disable the mouse
568 // script functions are lockMouse(true); Canvas.cursorOff();
569 pWindow->setMouseLocked(true);
570 pCanvas->setCursorON( false );
571
572 // Trigger 2 is used by the camera
573 MoveManager::mTriggerCount[2]++;
574 mMiddleMouseTriggered = true;
575
576 setFirstResponder();
577 }
578}
579
580void EditTSCtrl::onMiddleMouseUp(const GuiEvent & event)
581{

Callers

nothing calls this directly

Calls 4

getPlatformWindowMethod · 0.80
getCursorControllerMethod · 0.80
setCursorONMethod · 0.80
setMouseLockedMethod · 0.45

Tested by

no test coverage detected