| 145 | } |
| 146 | |
| 147 | void WidgetsWindow::requestCreateWidgetItem(MyGUI::ItemBox* _sender, MyGUI::Widget* _item) |
| 148 | { |
| 149 | MyGUI::Button* button = _item->createWidget<MyGUI::Button>( |
| 150 | mButtonSkinName, |
| 151 | MyGUI::IntCoord( |
| 152 | mWidgetsButtonOffset, |
| 153 | mWidgetsButtonOffset, |
| 154 | _item->getWidth() - mWidgetsButtonOffset - mWidgetsButtonOffset, |
| 155 | _item->getHeight() - mWidgetsButtonOffset - mWidgetsButtonOffset), |
| 156 | MyGUI::Align::Stretch); |
| 157 | |
| 158 | button->setTextAlign(MyGUI::Align::Center); |
| 159 | button->eventMouseButtonClick += MyGUI::newDelegate(this, &WidgetsWindow::notifySelectWidgetType); |
| 160 | button->setNeedToolTip(true); |
| 161 | button->eventToolTip += MyGUI::newDelegate(this, &WidgetsWindow::notifyToolTip); |
| 162 | |
| 163 | _item->setUserData(button); |
| 164 | } |
| 165 | |
| 166 | void WidgetsWindow::requestCoordItem(MyGUI::ItemBox* _sender, MyGUI::IntCoord& _coord, bool _drag) const |
| 167 | { |
nothing calls this directly
no test coverage detected