Work
This commit is contained in:
7
text.go
7
text.go
@@ -38,13 +38,14 @@ type Text struct {
|
||||
var _ Widget = (*Text)(nil)
|
||||
|
||||
func NewText(id string, style tcell.Style) *Text {
|
||||
ret := &Text{style: style}
|
||||
ret.Init(id)
|
||||
ret := &Text{}
|
||||
ret.Init(id, style)
|
||||
return ret
|
||||
}
|
||||
|
||||
func (w *Text) Init(id string) {
|
||||
func (w *Text) Init(id string, style tcell.Style) {
|
||||
w.id = id
|
||||
w.style = style
|
||||
w.visible = true
|
||||
}
|
||||
func (w *Text) Id() string { return w.id }
|
||||
|
||||
Reference in New Issue
Block a user