mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-24 18:58: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
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user