| 77 | buttonLayout->addChild(cancelButton); |
| 78 | |
| 79 | struct AsyncOkButton : Button { |
| 80 | AsyncDialog* dialog; |
| 81 | std::function<void()> action; |
| 82 | void onAction(const ActionEvent& e) override { |
| 83 | action(); |
| 84 | dialog->getParent()->requestDelete(); |
| 85 | } |
| 86 | }; |
| 87 | AsyncOkButton* const okButton = new AsyncOkButton; |
| 88 | okButton->box.size.x = buttonWidth; |
| 89 | okButton->text = "Ok"; |
nothing calls this directly
no outgoing calls
no test coverage detected