| 8 | } |
| 9 | |
| 10 | Button::Button(std::shared_ptr<ViewCoreFactory> viewCoreFactory) : View(std::move(viewCoreFactory)) |
| 11 | { |
| 12 | detail::VIEW_CORE_REGISTER(Button, View::viewCoreFactory()); |
| 13 | |
| 14 | label.onChange() += [&](auto &prop) { |
| 15 | if (!prop.get().empty()) { |
| 16 | imageURL = ""; |
| 17 | } |
| 18 | }; |
| 19 | imageURL.onChange() += [&](auto &prop) { |
| 20 | if (!prop.get().empty()) { |
| 21 | label = ""; |
| 22 | } |
| 23 | }; |
| 24 | } |
| 25 | |
| 26 | Notifier<const ClickEvent &> &Button::onClick() { return _onClick; } |
| 27 |