blob: bfa7321141b9cb973cc680920b4e1af53b335b03 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
package src
import (
"fmt"
"github.com/rivo/tview"
)
func (a *app) alert(format string, params ...interface{}) {
modal := tview.NewModal().
SetText(fmt.Sprintf(format, params...)).
AddButtons([]string{"OK"}).
SetDoneFunc(func(_ int, _ string) {
a.pages.RemovePage("alert")
})
a.pages.AddPage("alert", modal, true, true)
}
|