Skip to content

Commit 9dc105f

Browse files
committed
debugui: let TextField return true when unfocused
1 parent de1a2ae commit 9dc105f

2 files changed

Lines changed: 0 additions & 2 deletions

File tree

control.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,6 @@ func (c *Context) textFieldRaw(buf *string, id controlID, opt option) bool {
231231

232232
// handle return
233233
if inpututil.IsKeyJustPressed(ebiten.KeyEnter) {
234-
c.setFocus(0)
235234
res = true
236235
f.SetTextAndSelection("", 0, 0)
237236
}

example/ui.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,6 @@ func (g *Game) logWindow(ctx *debugui.Context) {
164164
var submitted bool
165165
ctx.SetGridLayout([]int{-1, 70}, nil)
166166
if ctx.TextField(&g.logSubmitBuf) {
167-
ctx.SetFocus()
168167
submitted = true
169168
}
170169
if ctx.Button("Submit") {

0 commit comments

Comments
 (0)