Add Text.Text and Input.Text
This commit is contained in:
parent
368514415e
commit
f12353f314
2 changed files with 8 additions and 0 deletions
4
input.go
4
input.go
|
@ -45,6 +45,10 @@ func (i *Input) Write(p []byte) (n int, err error) {
|
|||
return i.field.Write(p)
|
||||
}
|
||||
|
||||
func (i *Input) Text() string {
|
||||
return i.field.Text()
|
||||
}
|
||||
|
||||
func (i *Input) SetRect(r image.Rectangle) {
|
||||
i.Box.rect = r
|
||||
|
||||
|
|
4
text.go
4
text.go
|
@ -39,6 +39,10 @@ func (t *Text) Write(p []byte) (n int, err error) {
|
|||
return t.field.Write(p)
|
||||
}
|
||||
|
||||
func (t *Text) Text() string {
|
||||
return t.field.Text()
|
||||
}
|
||||
|
||||
func (t *Text) SetRect(r image.Rectangle) {
|
||||
t.Box.rect = r
|
||||
|
||||
|
|
Loading…
Reference in a new issue