From 1b70901659c2dbea942a24ba7aa52fbdb826af17 Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Sun, 18 Apr 2021 01:07:09 +0900 Subject: [PATCH] examples/windowsize: Swap arrow keys for resizing --- examples/windowsize/main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/windowsize/main.go b/examples/windowsize/main.go index 1fc9d76a3..c70d86189 100644 --- a/examples/windowsize/main.go +++ b/examples/windowsize/main.go @@ -135,11 +135,11 @@ func (g *game) Update() error { const d = 16 toUpdateWindowSize := false if ebiten.IsKeyPressed(ebiten.KeyShift) { - if inpututil.IsKeyJustPressed(ebiten.KeyUp) { + if inpututil.IsKeyJustPressed(ebiten.KeyDown) { screenHeight += d toUpdateWindowSize = true } - if inpututil.IsKeyJustPressed(ebiten.KeyDown) { + if inpututil.IsKeyJustPressed(ebiten.KeyUp) { if 16 < screenHeight && d < screenHeight { screenHeight -= d toUpdateWindowSize = true