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

Method findMouseControl

Engine/source/gui/core/guiCanvas.cpp:1195–1213  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1193}
1194
1195void GuiCanvas::findMouseControl(const GuiEvent &event)
1196{
1197 // Any children at all?
1198 if(size() == 0)
1199 {
1200 mMouseControl = NULL;
1201 return;
1202 }
1203
1204 // Otherwise, check the point and find the overlapped control.
1205 GuiControl *controlHit = findHitControl(event.mousePoint);
1206 if(controlHit != static_cast<GuiControl*>(mMouseControl))
1207 {
1208 if(bool(mMouseControl))
1209 mMouseControl->onMouseLeave(event);
1210 mMouseControl = controlHit;
1211 mMouseControl->onMouseEnter(event);
1212 }
1213}
1214
1215void GuiCanvas::refreshMouseControl()
1216{

Callers

nothing calls this directly

Calls 3

sizeFunction · 0.50
onMouseLeaveMethod · 0.45
onMouseEnterMethod · 0.45

Tested by

no test coverage detected