Skip to content

Commit

Permalink
Add fullscreen toggle via F11/F
Browse files Browse the repository at this point in the history
  • Loading branch information
kettek committed Jul 16, 2024
1 parent 7c27590 commit 3bae84c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions internal/game/game.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,10 @@ func (g *Game) Update() error {
g.camera.ZoomOut()
}

if inpututil.IsKeyJustPressed(ebiten.KeyF11) || inpututil.IsKeyJustPressed(ebiten.KeyF) {
ebiten.SetFullscreen(!ebiten.IsFullscreen())
}

// FIXME: For some reason Layout doesn't position the UI properly...
g.ui.Layout(&g.uiOptions)

Expand Down

0 comments on commit 3bae84c

Please sign in to comment.