| 17 | FACTORY_ITEM_ATTRIBUTE(AnimationViewControl) |
| 18 | |
| 19 | void AnimationViewControl::OnInitialise(Control* _parent, MyGUI::Widget* _place, std::string_view _layoutName) |
| 20 | { |
| 21 | Control::OnInitialise(_parent, _place, _layoutName); |
| 22 | |
| 23 | InitialiseByAttributes(this); |
| 24 | |
| 25 | std::string parentType = "Index"; |
| 26 | DataSelectorManager::getInstance() |
| 27 | .getEvent(parentType) |
| 28 | ->connect(this, &AnimationViewControl::notifyChangeDataSelector); |
| 29 | mParentData = DataUtility::getSelectedDataByType(parentType); |
| 30 | notifyChangeDataSelector(mParentData, false); |
| 31 | |
| 32 | mImage->getParent()->eventChangeCoord += MyGUI::newDelegate(this, &AnimationViewControl::notifyChangeCoord); |
| 33 | updateImageCoord(); |
| 34 | |
| 35 | MyGUI::Gui::getInstance().eventFrameStart += MyGUI::newDelegate(this, &AnimationViewControl::notifyFrameStart); |
| 36 | |
| 37 | mButtonPlay->eventMouseButtonClick += MyGUI::newDelegate(this, &AnimationViewControl::notifyMouseButtonClick); |
| 38 | mButtonLeft->eventMouseButtonClick += MyGUI::newDelegate(this, &AnimationViewControl::notifyMouseButtonClick); |
| 39 | mButtonRight->eventMouseButtonClick += MyGUI::newDelegate(this, &AnimationViewControl::notifyMouseButtonClick); |
| 40 | } |
| 41 | |
| 42 | void AnimationViewControl::notifyChangeDataSelector(DataPtr _parent, bool _changeSelectOnly) |
| 43 | { |
nothing calls this directly
no test coverage detected