| 247 | buttonLayout->addChild(cancelButton); |
| 248 | |
| 249 | struct AsyncOkButton : Button { |
| 250 | AsyncTextInput* dialog; |
| 251 | TextField* textField; |
| 252 | std::function<void(char*)> action; |
| 253 | void onAction(const ActionEvent& e) override { |
| 254 | action(strdup(textField->text.c_str())); |
| 255 | dialog->getParent()->requestDelete(); |
| 256 | } |
| 257 | }; |
| 258 | AsyncOkButton* const okButton = new AsyncOkButton; |
| 259 | okButton->box.size.x = buttonWidth; |
| 260 | okButton->text = "Ok"; |
nothing calls this directly
no outgoing calls
no test coverage detected