Updated widdle api

This commit is contained in:
Brian Buller 2023-03-31 07:27:22 -05:00
parent 5ff74e851c
commit 2378c9e617
2 changed files with 4 additions and 0 deletions

View File

@ -136,6 +136,8 @@ func (w *PromptForTagWiddle) Measure() {
w.cancelButton.SetWidth(10)
w.cancelButton.SetHeight(1)
}
func (w *PromptForTagWiddle) SetPos(x, y int) { w.x, w.y = x, y }
func (w *PromptForTagWiddle) SetSize(wdt, hgt int) { w.w, w.h = wdt, hgt }
func (w *PromptForTagWiddle) handleTermboxEvent(msg termbox.Event) wandle.Cmd {
if msg.Key == termbox.KeyEsc {

View File

@ -125,6 +125,8 @@ func (w *PartManager) Measure() {
w.input.SetWidth(w.w - 2)
w.input.SetHeight(1)
}
func (w *PartManager) SetPos(x, y int) { w.x, w.y = x, y }
func (w *PartManager) SetSize(wdt, hgt int) { w.w, w.h = wdt, hgt }
func (w *PartManager) SetLabel(lbl string) { w.label = lbl }
func (w *PartManager) SetType(tp string) { w.typeString = tp }