Add TextView, improved Scrollbar
This commit is contained in:
4
input.go
4
input.go
@@ -20,6 +20,7 @@ type TextInput struct {
|
||||
func NewTextInput (text string) *TextInput {
|
||||
this := &TextInput { TextBox: tomo.NewTextBox() }
|
||||
theme.Apply(this, theme.R("objects", "TextInput", ""))
|
||||
this.SetAlign(tomo.AlignStart, tomo.AlignMiddle)
|
||||
this.SetText(text)
|
||||
this.SetFocusable(true)
|
||||
this.SetSelectable(true)
|
||||
@@ -53,6 +54,9 @@ func (this *TextInput) handleKeyDown (key input.Key, numpad bool) {
|
||||
sel := modifiers.Shift
|
||||
changed := false
|
||||
|
||||
// TODO all this (except editing stuff) really should be moved into the
|
||||
// backend
|
||||
|
||||
switch {
|
||||
case key == input.KeyEnter:
|
||||
this.on.enter.Broadcast()
|
||||
|
||||
Reference in New Issue
Block a user