Some work
This commit is contained in:
@@ -63,8 +63,10 @@ func (w *Button) Init(id string, style tcell.Style) {
|
||||
w.onPressed = func() bool { return false }
|
||||
w.focusable = true
|
||||
}
|
||||
func (w *Button) Id() string { return w.id }
|
||||
func (w *Button) HandleResize(ev *tcell.EventResize) { w.w, w.h = ev.Size() }
|
||||
func (w *Button) Id() string { return w.id }
|
||||
func (w *Button) HandleResize(ev *tcell.EventResize) {
|
||||
w.w, w.h = ev.Size()
|
||||
}
|
||||
|
||||
func (w *Button) SetKeyMap(km KeyMap) { w.keyMap = km }
|
||||
func (w *Button) AddToKeyMap(km KeyMap) { w.keyMap.Merge(km) }
|
||||
@@ -113,6 +115,7 @@ func (w *Button) Draw(screen tcell.Screen) {
|
||||
wh.DrawText(w.x, w.y+1, fmt.Sprintf("╰%s╯", strings.Repeat("─", len(lbl)-2)), dStyle, screen)
|
||||
return
|
||||
}
|
||||
|
||||
if w.w < 2 {
|
||||
wh.DrawText(w.x, w.y, "╬", dStyle, screen)
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user