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

21 lines
514 B
GDScript3
Raw Normal View History

2021-11-15 16:25:13 -06:00
extends Node
2021-11-15 15:02:55 -06:00
2021-12-08 23:39:56 -06:00
func _ready():
2021-12-09 21:10:17 -06:00
$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)
2021-12-08 23:39:56 -06:00
if Global.check_onetime_flag("multiplayer"):
_on_multiplayer_pressed()
2021-11-15 15:43:33 -06:00
func _on_Singleplayer_pressed():
Global.start_singleplayer_game()
2021-11-15 16:25:13 -06:00
2021-12-08 23:39:56 -06:00
func _on_multiplayer_pressed():
2021-11-17 13:57:45 -06:00
Global.lobby_browser()
2021-11-15 16:25:13 -06:00
func _on_JoinLobbyButton_pressed():
2021-11-17 08:18:12 -06:00
Global.quit()
2021-12-06 21:56:37 -06:00
func _on_LinkButton_pressed():
OS.shell_open("https://lyte.dev")