aboutsummaryrefslogtreecommitdiff
path: root/client/scripts/main_menu.gd
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2024-06-23 20:05:28 +0200
committermetamuffin <metamuffin@disroot.org>2024-06-23 20:05:28 +0200
commit3885cbfae528608350804f704dba9c82fdbfd027 (patch)
tree384a37820cf43d1868493600a8e0566c78b9ab4a /client/scripts/main_menu.gd
parent93221433e704e1c98cc84c55caefddb85c2d5717 (diff)
downloadhurrycurry-3885cbfae528608350804f704dba9c82fdbfd027.tar
hurrycurry-3885cbfae528608350804f704dba9c82fdbfd027.tar.bz2
hurrycurry-3885cbfae528608350804f704dba9c82fdbfd027.tar.zst
move files around
Diffstat (limited to 'client/scripts/main_menu.gd')
-rw-r--r--client/scripts/main_menu.gd49
1 files changed, 0 insertions, 49 deletions
diff --git a/client/scripts/main_menu.gd b/client/scripts/main_menu.gd
deleted file mode 100644
index df09cf7f..00000000
--- a/client/scripts/main_menu.gd
+++ /dev/null
@@ -1,49 +0,0 @@
-# Undercooked - a game about cooking
-# Copyright 2024 metamuffin
-# Copyright 2024 tpart
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, version 3 of the License only.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see <https://www.gnu.org/licenses/>.
-#
-extends Control
-
-@onready var quick_connect = $side/margin/options/quick_connect
-@onready var quit_button = $side/margin/options/quit
-
-func _ready():
- quick_connect.grab_focus()
- if OS.has_feature("web"):
- quit_button.hide()
-
-func _on_quit_pressed():
- get_tree().quit()
-
-func _on_credits_pressed():
- $SceneTransition.transition_to("res://scenes/credits_menu.tscn")
-
-func _on_connect_pressed():
- connect_to($side/options/connect/uri.text)
-
-func _on_quick_connect_pressed():
- if OS.has_feature("JavaScript"):
- connect_to(JavaScriptBridge.eval("""
- window.location.protocol.endsWith("s:")
- ? `wss://${window.location.host}/`
- : `ws://${window.location.hostname}:27032/`
- """))
- else:
- connect_to("wss://undercooked.metamuffin.org/")
-
-func connect_to(url):
- print("Connecting to %s" % url)
- Multiplayer.url = url
- $SceneTransition.transition_to("res://scenes/game.tscn")