mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-11 19:48:54 +01:00
examples/windowsize: Use the screen's Size()
This commit is contained in:
parent
1b86bb9889
commit
4bf3b4e44e
@ -32,8 +32,6 @@ const (
|
|||||||
|
|
||||||
var (
|
var (
|
||||||
gophersImage *ebiten.Image
|
gophersImage *ebiten.Image
|
||||||
screenWidth = initScreenWidth
|
|
||||||
screenHeight = initScreenHeight
|
|
||||||
screenScale = initScreenScale
|
screenScale = initScreenScale
|
||||||
keyStates = map[ebiten.Key]int{
|
keyStates = map[ebiten.Key]int{
|
||||||
ebiten.KeyUp: 0,
|
ebiten.KeyUp: 0,
|
||||||
@ -59,7 +57,7 @@ func update(screen *ebiten.Image) error {
|
|||||||
case 2:
|
case 2:
|
||||||
d = 16
|
d = 16
|
||||||
}
|
}
|
||||||
|
screenWidth, screenHeight := screen.Size()
|
||||||
if keyStates[ebiten.KeyUp] == 1 {
|
if keyStates[ebiten.KeyUp] == 1 {
|
||||||
screenHeight += d
|
screenHeight += d
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user