mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-25 03:08:54 +01:00
examples/windowsize: Swap arrow keys for resizing
This commit is contained in:
parent
f09cf7fa47
commit
1b70901659
@ -135,11 +135,11 @@ func (g *game) Update() error {
|
|||||||
const d = 16
|
const d = 16
|
||||||
toUpdateWindowSize := false
|
toUpdateWindowSize := false
|
||||||
if ebiten.IsKeyPressed(ebiten.KeyShift) {
|
if ebiten.IsKeyPressed(ebiten.KeyShift) {
|
||||||
if inpututil.IsKeyJustPressed(ebiten.KeyUp) {
|
if inpututil.IsKeyJustPressed(ebiten.KeyDown) {
|
||||||
screenHeight += d
|
screenHeight += d
|
||||||
toUpdateWindowSize = true
|
toUpdateWindowSize = true
|
||||||
}
|
}
|
||||||
if inpututil.IsKeyJustPressed(ebiten.KeyDown) {
|
if inpututil.IsKeyJustPressed(ebiten.KeyUp) {
|
||||||
if 16 < screenHeight && d < screenHeight {
|
if 16 < screenHeight && d < screenHeight {
|
||||||
screenHeight -= d
|
screenHeight -= d
|
||||||
toUpdateWindowSize = true
|
toUpdateWindowSize = true
|
||||||
|
Loading…
Reference in New Issue
Block a user