diff options
author | metamuffin <metamuffin@disroot.org> | 2025-07-17 20:40:57 +0200 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2025-07-17 20:40:59 +0200 |
commit | 0eeb392a61c592d25eee7088006a1aa871d8f650 (patch) | |
tree | 3f78038c3c786b1e48f301e1bc61d1c50565add9 | |
parent | 84526630c762489fdb544fe923d92cb5a6e666e9 (diff) | |
download | hurrycurry-0eeb392a61c592d25eee7088006a1aa871d8f650.tar hurrycurry-0eeb392a61c592d25eee7088006a1aa871d8f650.tar.bz2 hurrycurry-0eeb392a61c592d25eee7088006a1aa871d8f650.tar.zst |
hide editor controls if unavailable; fix #349
-rw-r--r-- | client/menu/play.gd | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/client/menu/play.gd b/client/menu/play.gd index bd52f5d1..05105ced 100644 --- a/client/menu/play.gd +++ b/client/menu/play.gd @@ -26,6 +26,8 @@ var url_regex: RegEx = RegEx.new() @onready var server_connect = $side/margin/options/second/server/connect @onready var editor_control = $side/margin/options/second/editor/control @onready var editor_connect = $side/margin/options/second/editor/connect +@onready var editor_container = $side/margin/options/second/editor + func _ready(): url_regex.compile("^(?:(ws|wss)://)?([^:]+)(?::([0-9]+))?$") @@ -174,6 +176,7 @@ func _process(_delta): editor_control.disabled = false editor_connect.visible = Editor.state == Service.State.RUNNING editor_control.modulate = Color.WHITE + editor_container.visible = Editor.state != Service.State.UNAVAILABLE match Editor.state: Service.State.RUNNING: editor_control.text = tr("c.menu.play.editor_stop") |