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

Method updateDropItems

MyGUIEngine/src/MyGUI_ItemBox.cpp:555–581  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

553 }
554
555 void ItemBox::updateDropItems()
556 {
557 if (nullptr == mItemDrag)
558 {
559 // спрашиваем размер иконок
560 IntCoord coord;
561
562 requestCoordItem(this, coord, true);
563
564 mPointDragOffset = coord.point();
565
566 // создаем и запрашиваем детей
567 mItemDrag = Gui::getInstance().createWidget<Widget>(
568 "Default",
569 IntCoord(0, 0, coord.width, coord.height),
570 Align::Default,
571 mDragLayer);
572 requestCreateWidgetItem(this, mItemDrag);
573 }
574
575 const IntPoint& point = InputManager::getInstance().getMousePosition();
576
577 mItemDrag->setPosition(
578 point.left - mClickInWidget.left + mPointDragOffset.left,
579 point.top - mClickInWidget.top + mPointDragOffset.top);
580 mItemDrag->setVisible(true);
581 }
582
583 void ItemBox::updateDropItemsState(const DDWidgetState& _state)
584 {

Callers

nothing calls this directly

Calls 7

requestCoordItemFunction · 0.85
requestCreateWidgetItemFunction · 0.85
IntCoordFunction · 0.50
pointMethod · 0.45
getMousePositionMethod · 0.45
setPositionMethod · 0.45
setVisibleMethod · 0.45

Tested by

no test coverage detected