ebiten: add RunGameOptions.ApplePressAndHoldEnabled

Updates #3233
This commit is contained in:
Hajime Hoshi
2025-05-11 21:02:59 +09:00
parent d75698de4e
commit d6f95c4e8c
8 changed files with 57 additions and 16 deletions
+3 -1
View File
@@ -325,7 +325,9 @@ func (g *Game) Layout(outsideWidth, outsideHeight int) (int, int) {
func main() {
ebiten.SetWindowSize(screenWidth, screenHeight)
ebiten.SetWindowTitle("Text Input (Ebitengine Demo)")
if err := ebiten.RunGame(&Game{}); err != nil {
op := &ebiten.RunGameOptions{}
op.ApplePressAndHoldEnabled = true
if err := ebiten.RunGameWithOptions(&Game{}, op); err != nil {
log.Fatal(err)
}
}