Toggle Fullscreen with F for my shitty laptop
This commit is contained in:
parent
8958c3328f
commit
937cc5deba
6
main.go
6
main.go
@ -8,7 +8,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
screenWidth = 1600
|
screenWidth = 1300
|
||||||
screenHeight = 800
|
screenHeight = 800
|
||||||
numLanes = 5
|
numLanes = 5
|
||||||
numGarages = 5
|
numGarages = 5
|
||||||
@ -98,6 +98,10 @@ func (g *Game) draw() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (g *Game) update() {
|
func (g *Game) update() {
|
||||||
|
if rl.IsKeyPressed(rl.KeyF) {
|
||||||
|
rl.ToggleFullscreen()
|
||||||
|
}
|
||||||
|
|
||||||
if g.gameOver {
|
if g.gameOver {
|
||||||
if rl.IsKeyPressed(rl.KeyEnter) {
|
if rl.IsKeyPressed(rl.KeyEnter) {
|
||||||
*g = *NewGame()
|
*g = *NewGame()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user