examples: use app.gg.quit() instead of exit(0)

pull/12441/head
Delyan Angelov 2021-11-11 17:45:22 +02:00
parent 9cb378bb6b
commit 4728b975e3
No known key found for this signature in database
GPG Key ID: 66886C0F12D595ED
3 changed files with 3 additions and 3 deletions

View File

@ -788,7 +788,7 @@ fn (mut app App) on_key_down(key gg.KeyCode) {
// these keys are independent from the game state:
match key {
.a { app.is_ai_mode = !app.is_ai_mode }
.escape { exit(0) }
.escape { app.gg.quit() }
.n, .r { app.new_game() }
.backspace { app.undo() }
.enter { app.next_tile_format() }

View File

@ -274,7 +274,7 @@ fn (mut app App) key_down(key gg.KeyCode) {
// global keys
match key {
.escape {
exit(0)
app.gg.quit()
}
._0 {
app.timer_period_ms = 0

View File

@ -459,7 +459,7 @@ fn (mut game Game) key_down(key gg.KeyCode) {
// global keys
match key {
.escape {
exit(0)
game.gg.quit()
}
.space {
if game.state == .running {