examples/windowsize: Swap arrow keys for resizing

This commit is contained in:
Hajime Hoshi 2021-04-18 01:07:09 +09:00
parent f09cf7fa47
commit 1b70901659

View File

@ -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