Пример #1
0
func editName(oldName string) string {
	w, _ := termbox.Size()
	wnd := window.New(w-10, 2, w-2, 3)
	fd := &console.FieldDesc{
		Window: wnd,
		Value:  oldName,
	}
	console.EditField(fd)
	return fd.Value
}
Пример #2
0
func editDesc(oldDesc string) string {
	w, _ := termbox.Size()
	wnd := window.New(w-60, 3, w-2, 4)
	fd := &console.FieldDesc{
		Window:      wnd,
		Value:       oldDesc,
		AllowSpaces: true,
	}
	console.EditField(fd)
	return fd.Value
}