| 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 | { |
nothing calls this directly
no test coverage detected