godot-webrtc-mplayer-testing/scripts/screens/main_menu.gd

21 lines
514 B
GDScript

extends Node
func _ready():
$v/h/quit.shortcut = Global.key_shortcut(KEY_ESCAPE)
$v/h/multiplayer.shortcut = Global.key_shortcut(KEY_M)
$v/h/singleplayer.shortcut = Global.key_shortcut(KEY_S)
if Global.check_onetime_flag("multiplayer"):
_on_multiplayer_pressed()
func _on_Singleplayer_pressed():
Global.start_singleplayer_game()
func _on_multiplayer_pressed():
Global.lobby_browser()
func _on_JoinLobbyButton_pressed():
Global.quit()
func _on_LinkButton_pressed():
OS.shell_open("https://lyte.dev")