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

Method getCursor

Engine/source/gui/core/guiControl.cpp:2443–2470  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2441//-----------------------------------------------------------------------------
2442
2443void GuiControl::getCursor(GuiCursor *&cursor, bool &showCursor, const GuiEvent &lastGuiEvent)
2444{
2445#ifdef _XBOX
2446 return;
2447#endif
2448
2449 TORQUE_UNUSED(lastGuiEvent);
2450
2451 if( !getRoot() )
2452 return;
2453
2454 if(getRoot()->mCursorChanged != -1 && !isMouseLocked())
2455 {
2456 // We've already changed the cursor,
2457 // so set it back before we change it again.
2458
2459 PlatformWindow *pWindow = static_cast<GuiCanvas*>(getRoot())->getPlatformWindow();
2460 if (!pWindow)
2461 return;
2462 PlatformCursorController *pController = pWindow->getCursorController();
2463 AssertFatal(pController != NULL,"PlatformWindow without an owned CursorController!");
2464
2465 pController->popCursor();
2466
2467 // We haven't changed it
2468 getRoot()->mCursorChanged = -1;
2469 }
2470}
2471
2472//-----------------------------------------------------------------------------
2473

Callers 1

renderFrameMethod · 0.45

Calls 3

getPlatformWindowMethod · 0.80
getCursorControllerMethod · 0.80
popCursorMethod · 0.80

Tested by

no test coverage detected