| 18 | } |
| 19 | |
| 20 | void TextureBrowseControl::OnInitialise(Control* _parent, MyGUI::Widget* _place, std::string_view /*_layoutName*/) |
| 21 | { |
| 22 | Control::OnInitialise(_parent, _place, GetLayoutName(this)); |
| 23 | |
| 24 | InitialiseByAttributes(this); |
| 25 | |
| 26 | setDialogRoot(mMainWidget); |
| 27 | |
| 28 | assignBase(mTextures, "Textures"); |
| 29 | |
| 30 | mOk->eventMouseButtonClick += MyGUI::newDelegate(this, &TextureBrowseControl::notifyMouseButtonClickOk); |
| 31 | mCancel->eventMouseButtonClick += MyGUI::newDelegate(this, &TextureBrowseControl::notifyMouseButtonClickCancel); |
| 32 | |
| 33 | MyGUI::Window* window = mMainWidget->castType<MyGUI::Window>(false); |
| 34 | if (window != nullptr) |
| 35 | window->eventWindowButtonPressed += |
| 36 | MyGUI::newDelegate(this, &TextureBrowseControl::notifyWindowButtonPressed); |
| 37 | |
| 38 | MyGUI::ItemBox* box = mTextures->getItemBox(); |
| 39 | box->eventChangeItemPosition += MyGUI::newDelegate(this, &TextureBrowseControl::notifyChangeItemPosition); |
| 40 | box->eventSelectItemAccept += MyGUI::newDelegate(this, &TextureBrowseControl::notifySelectItemAccept); |
| 41 | |
| 42 | mMainWidget->setVisible(false); |
| 43 | } |
| 44 | |
| 45 | void TextureBrowseControl::onDoModal() |
| 46 | { |
nothing calls this directly
no test coverage detected