mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-26 03:38:55 +01:00
examples/textinput: bug fix: reset the state after committing
This commit is contained in:
parent
af5edf136d
commit
2b03637b52
@ -181,7 +181,7 @@ func (t *TextField) Update() {
|
|||||||
t.text = t.text[:t.selectionStart] + state.Text + t.text[t.selectionEnd:]
|
t.text = t.text[:t.selectionStart] + state.Text + t.text[t.selectionEnd:]
|
||||||
t.selectionStart += len(state.Text)
|
t.selectionStart += len(state.Text)
|
||||||
t.selectionEnd = t.selectionStart
|
t.selectionEnd = t.selectionStart
|
||||||
state = textinput.State{}
|
t.state = textinput.State{}
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
t.state = state
|
t.state = state
|
||||||
|
Loading…
Reference in New Issue
Block a user