MCPcopy Create free account
hub / github.com/MyGUI/mygui / connectPoint

Method connectPoint

UnitTests/UnitTest_GraphView/BaseGraphView.h:420–438  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

418 }
419
420 void connectPoint(BaseGraphConnection* _connection)
421 {
422 const MyGUI::IntPoint& mouse = MyGUI::InputManager::getInstance().getMousePosition();
423
424 // пикаем виджет под нами
425 MyGUI::Widget* widget = MyGUI::LayerManager::getInstance().getWidgetFromPoint(mouse.left, mouse.top);
426 if (widget != nullptr)
427 {
428 BaseGraphConnection** connection = widget->getUserData<BaseGraphConnection*>(false);
429 if (connection != nullptr)
430 {
431 bool accept = requestConnectToPoint(_connection, *connection);
432 if (accept)
433 {
434 eventConnectToPoint(_connection, *connection);
435 }
436 }
437 }
438 }
439
440 bool requestConnectToPoint(BaseGraphConnection* _from, BaseGraphConnection* _to)
441 {

Callers

nothing calls this directly

Calls 2

getWidgetFromPointMethod · 0.80
getMousePositionMethod · 0.45

Tested by

no test coverage detected