online multiplayer chess game (note server currently down)
-rw-r--r--ui/Settings.gd5
-rw-r--r--ui/StartMenu.tscn12
2 files changed, 10 insertions, 7 deletions
diff --git a/ui/Settings.gd b/ui/Settings.gd
index 04d568e..a26afb7 100644
--- a/ui/Settings.gd
+++ b/ui/Settings.gd
@@ -26,13 +26,16 @@ func toggle(onoff) -> void:
func update_button_visuals(set = settings) -> void:
vsyncbutton.pressed = set["vsync"]
fullscreenbutton.pressed = set["fullscreen"]
- borderlessbutton.pressed = !set["borderless"]
+ if is_instance_valid(borderlessbutton):
+ borderlessbutton.pressed = !set["borderless"]
board_color1.color = set["board_color1"]
board_color2.color = set["board_color2"]
preview.call_deferred("update_preview", set["board_color1"], set["board_color2"], set["piece_set"])
func _ready() -> void:
+ if OS.has_feature("HTML5"):
+ borderlessbutton.queue_free()
board_color1.color = settings.board_color1
board_color2.color = settings.board_color2
for i in piece_sets: # add the items
diff --git a/ui/StartMenu.tscn b/ui/StartMenu.tscn
index cc69433..0c254ca 100644
--- a/ui/StartMenu.tscn
+++ b/ui/StartMenu.tscn
@@ -30,18 +30,18 @@ size_flags_horizontal = 0
size_flags_vertical = 0
drag_to_rearrange_enabled = true
-[node name="Settings" parent="tabs" instance=ExtResource( 3 )]
+[node name="Lobby" parent="tabs" instance=ExtResource( 4 )]
margin_left = 30.0
margin_top = 90.0
margin_right = -30.0
margin_bottom = -30.0
-[node name="Lobby" parent="tabs" instance=ExtResource( 4 )]
+[node name="Settings" parent="tabs" instance=ExtResource( 3 )]
visible = false
-margin_left = 10.0
-margin_top = 60.0
-margin_right = -10.0
-margin_bottom = -10.0
+margin_left = 30.0
+margin_top = 90.0
+margin_right = -30.0
+margin_bottom = -30.0
[node name="quit" type="Button" parent="tabs"]
visible = false