Really figuring some things out

This commit is contained in:
2025-08-07 11:18:03 -05:00
parent 7c96fbb187
commit b476c74683
23 changed files with 737 additions and 249 deletions

View File

@@ -29,6 +29,7 @@ import (
"github.com/gdamore/tcell"
)
// TODO: Rebuild with LinearLayouts
type Prompt struct {
id string
style tcell.Style
@@ -67,6 +68,11 @@ func (w *Prompt) Init(id string, style tcell.Style) {
}
func (w *Prompt) Id() string { return w.id }
func (w *Prompt) HandleResize(ev *tcell.EventResize) {
w.w, w.h = ev.Size()
w.w = wh.Min(w.w, w.WantW())
w.h = wh.Min(w.h, w.WantH())
w.message.SetPos(Coord{X: w.x + 1, Y: w.y + 1})
w.field.SetPos(Coord{X: w.x + 1, Y: WidgetBottom(w.message)})
w.btnOk.SetPos(Coord{X: w.x + w.w - w.btnOk.WantW(), Y: w.y + w.h - 1})