| 100 | } |
| 101 | |
| 102 | static void init() |
| 103 | { |
| 104 | MyGUI::ItemBox* box1 = MyGUI::Gui::getInstance().createWidget<MyGUI::ItemBox>( |
| 105 | "ItemBox", |
| 106 | MyGUI::IntCoord(10, 10, 300, 300), |
| 107 | MyGUI::Align::Default, |
| 108 | "Overlapped"); |
| 109 | box1->setVerticalAlignment(true); |
| 110 | box1->requestCreateWidgetItem = MyGUI::newDelegate(requestCreateWidgetItem); |
| 111 | box1->requestCoordItem = MyGUI::newDelegate(requestCoordItem); |
| 112 | box1->requestDrawItem = MyGUI::newDelegate(requestDrawItem); |
| 113 | box1->eventStartDrag += MyGUI::newDelegate(eventStartDrag); |
| 114 | box1->eventRequestDrop += MyGUI::newDelegate(eventRequestDrop); |
| 115 | box1->eventDropResult += MyGUI::newDelegate(eventDropResult); |
| 116 | |
| 117 | box1->addItem((int)101); |
| 118 | box1->addItem((int)43); |
| 119 | box1->addItem((int)54); |
| 120 | |
| 121 | MyGUI::ItemBox* box2 = MyGUI::Gui::getInstance().createWidget<MyGUI::ItemBox>( |
| 122 | "ItemBox", |
| 123 | MyGUI::IntCoord(410, 10, 300, 300), |
| 124 | MyGUI::Align::Default, |
| 125 | "Overlapped"); |
| 126 | box2->setVerticalAlignment(true); |
| 127 | box2->requestCreateWidgetItem = MyGUI::newDelegate(requestCreateWidgetItem); |
| 128 | box2->requestCoordItem = MyGUI::newDelegate(requestCoordItem); |
| 129 | box2->requestDrawItem = MyGUI::newDelegate(requestDrawItem); |
| 130 | box2->eventStartDrag += MyGUI::newDelegate(eventStartDrag); |
| 131 | box2->eventRequestDrop += MyGUI::newDelegate(eventRequestDrop); |
| 132 | box2->eventDropResult += MyGUI::newDelegate(eventDropResult); |
| 133 | |
| 134 | box2->addItem((int)14); |
| 135 | box2->addItem((int)273); |
| 136 | box2->addItem((int)75); |
| 137 | } |
| 138 | |
| 139 | void DemoKeeper::setupResources() |
| 140 | { |
no test coverage detected