confirmDialog runs the confirm dialog.
()
| 313 | |
| 314 | // confirmDialog runs the confirm dialog. |
| 315 | func (fb *FuncButton) confirmDialog() { |
| 316 | ctx := fb.goodContext() |
| 317 | d := NewBody().AddTitle(fb.Text + "?").AddText("Are you sure you want to run " + fb.Text + "? " + fb.Tooltip) |
| 318 | d.AddBottomBar(func(parent Widget) { |
| 319 | d.AddCancel(parent) |
| 320 | d.AddOK(parent).SetText(fb.Text).OnClick(func(e events.Event) { |
| 321 | fb.callFuncShowReturns() |
| 322 | }) |
| 323 | }) |
| 324 | d.RunDialog(ctx) |
| 325 | } |
| 326 | |
| 327 | // CallFunc calls the function associated with this button, |
| 328 | // prompting the user for any arguments. |
no test coverage detected