Skip to content

Commit e0bcb33

Browse files
committed
fix: don't quit game on HTML5 exports
Previously, pressing the escape key at the main menu would lead to a user-unfriendly blank screen on browsers.
1 parent f4831a9 commit e0bcb33

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

scripts/menu.gd

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,6 @@ func _on_Timer_timeout():
1717
_level.next(null)
1818

1919
func _input(event):
20-
if event.is_action_pressed("ui_cancel"):
20+
# If not in a browser, close the app
21+
if event.is_action_pressed("ui_cancel") and OS.get_name() != "HTML5":
2122
get_tree().quit()

0 commit comments

Comments
 (0)