| 57 | |
| 58 | template<typename Type> |
| 59 | void InitialiseByAttributes( |
| 60 | Type* _owner, |
| 61 | MyGUI::Widget* _parent = nullptr, |
| 62 | bool _throw = true, |
| 63 | bool _createFakeWidgets = true) |
| 64 | { |
| 65 | typename attribute::AttributeFieldWidgetName<Type>::VectorBindPair& data = |
| 66 | attribute::AttributeFieldWidgetName<Type>::getData(); |
| 67 | for (typename attribute::AttributeFieldWidgetName<Type>::VectorBindPair::iterator item = data.begin(); |
| 68 | item != data.end(); |
| 69 | ++item) |
| 70 | { |
| 71 | MyGUI::Widget* value = nullptr; |
| 72 | assignWidget(value, item->second, _throw, false); |
| 73 | |
| 74 | bool result = item->first->set(_owner, value); |
| 75 | |
| 76 | if (!result && _createFakeWidgets) |
| 77 | { |
| 78 | value = CreateFakeWidgetT(item->first->getFieldTypeName(), mMainWidget); |
| 79 | item->first->set(_owner, value); |
| 80 | } |
| 81 | } |
| 82 | } |
| 83 | |
| 84 | virtual void OnInitialise(Control* _parent, MyGUI::Widget* _place, std::string_view _layoutName); |
| 85 | virtual void OnCommand(std::string_view _command); |
no test coverage detected