online multiplayer chess game (note server currently down)
various ui updates
| -rw-r--r-- | ui/menus/lobby/Lobby.gd | 2 | ||||
| -rw-r--r-- | ui/menus/lobby/Lobby.tscn | 1 | ||||
| -rw-r--r-- | ui/menus/local_multiplayer/GameConfig.tscn | 1 | ||||
| -rw-r--r-- | ui/menus/local_multiplayer/NoEngineLabel.gd | 10 | ||||
| -rw-r--r-- | ui/menus/settings/Settings.tscn | 151 | ||||
| -rw-r--r-- | ui/menus/startmenu/StartMenu.tscn | 40 | ||||
| -rw-r--r-- | ui/theme/main.theme | bin | 2357 -> 2291 bytes |
7 files changed, 113 insertions, 92 deletions
diff --git a/ui/menus/lobby/Lobby.gd b/ui/menus/lobby/Lobby.gd index 5540539..f4c2ca5 100644 --- a/ui/menus/lobby/Lobby.gd +++ b/ui/menus/lobby/Lobby.gd @@ -14,6 +14,8 @@ func toggle(onoff: bool) -> void: func _ready() -> void: + address.grab_focus() + address.caret_position = len(address.text) PacketHandler.lobby = self PacketHandler.connect("hosting", $"%stophost", "set_visible") PacketHandler.connect("connection_established", self, "reset") diff --git a/ui/menus/lobby/Lobby.tscn b/ui/menus/lobby/Lobby.tscn index f1d4c0f..610907e 100644 --- a/ui/menus/lobby/Lobby.tscn +++ b/ui/menus/lobby/Lobby.tscn @@ -88,6 +88,7 @@ focus_mode = 1 text = "a_game_name" align = 1 max_length = 11 +context_menu_enabled = false placeholder_text = "game_name" caret_blink = true caret_blink_speed = 0.5 diff --git a/ui/menus/local_multiplayer/GameConfig.tscn b/ui/menus/local_multiplayer/GameConfig.tscn index 50fd47c..9ae9327 100644 --- a/ui/menus/local_multiplayer/GameConfig.tscn +++ b/ui/menus/local_multiplayer/GameConfig.tscn @@ -32,6 +32,7 @@ margin_left = -335.0 margin_top = -124.0 margin_right = 335.0 margin_bottom = 124.0 +rect_min_size = Vector2( 450, 0 ) script = ExtResource( 3 ) button_group = ExtResource( 8 ) diff --git a/ui/menus/local_multiplayer/NoEngineLabel.gd b/ui/menus/local_multiplayer/NoEngineLabel.gd index ea0ba46..0d029c5 100644 --- a/ui/menus/local_multiplayer/NoEngineLabel.gd +++ b/ui/menus/local_multiplayer/NoEngineLabel.gd @@ -2,11 +2,11 @@ extends RichTextLabel export var color: Color -const vague_error = "[color=#%s][/color] You unable to use chess engine functionality." -const web_noengine := """[color=#%s][/color] Your browser does not support [url=https://stockfishchess.org/]Stockfish[/url]. -Try chrome for access to [url=https://stockfishchess.org/]Stockfish[/url].""" -const desktop_noengine := """[color=#%s][/color] [url=https://stockfishchess.org/]Stockfish[/url] is not yet implemented for desktop. -Try it on [url=https://bendn.itch.io/chess]web[/url] to use [url=https://stockfishchess.org/]Stockfish[/url].""" +const vague_error = "[color=#%s][/color] You are unable to use chess engine functionality." +const web_noengine := """[color=#%s][/color] Your browser does not [i]yet[/i] support [url=https://stockfishchess.org/]Stockfish[/url]. + Try chrome for access to [url=https://stockfishchess.org/]Stockfish[/url].""" +const desktop_noengine := """[color=#%s][/color] [url=https://stockfishchess.org/]Stockfish[/url] is not [i]yet[/i] implemented for desktop. + Try it on [url=https://bendn.itch.io/chess]web[/url] to use [url=https://stockfishchess.org/]Stockfish[/url].""" func _ready() -> void: diff --git a/ui/menus/settings/Settings.tscn b/ui/menus/settings/Settings.tscn index ad9ee97..dea5cf7 100644 --- a/ui/menus/settings/Settings.tscn +++ b/ui/menus/settings/Settings.tscn @@ -14,52 +14,77 @@ anchor_bottom = 1.0 theme = ExtResource( 1 ) script = ExtResource( 2 ) -[node name="H" type="HBoxContainer" parent="."] -margin_left = 308.0 -margin_top = 156.0 -margin_right = 1114.0 -margin_bottom = 644.0 +[node name="V" type="VBoxContainer" parent="."] +margin_left = 241.0 +margin_top = 151.0 +margin_right = 1181.0 +margin_bottom = 649.0 + +[node name="resetbutton" type="Button" parent="V"] +margin_left = 382.0 +margin_right = 558.0 +margin_bottom = 54.0 +focus_mode = 0 +size_flags_horizontal = 4 +text = "reset all ﰇ" + +[node name="H" type="HBoxContainer" parent="V"] +margin_top = 64.0 +margin_right = 940.0 +margin_bottom = 498.0 mouse_filter = 2 size_flags_horizontal = 0 size_flags_vertical = 0 +custom_constants/separation = 40 alignment = 1 -[node name="TabContainer" type="TabContainer" parent="H"] -margin_right = 296.0 -margin_bottom = 292.0 +[node name="V" type="VBoxContainer" parent="V/H"] +margin_right = 400.0 +margin_bottom = 434.0 + +[node name="Spacer" type="Control" parent="V/H/V"] +margin_right = 400.0 +margin_bottom = 24.0 +rect_min_size = Vector2( 0, 24 ) + +[node name="TabContainer" type="TabContainer" parent="V/H/V"] +margin_top = 34.0 +margin_right = 400.0 +margin_bottom = 356.0 +rect_min_size = Vector2( 400, 0 ) size_flags_vertical = 0 custom_constants/hseparation = 20 drag_to_rearrange_enabled = true use_hidden_tabs_for_min_size = true -[node name="" type="VBoxContainer" parent="H/TabContainer"] +[node name=" board" type="VBoxContainer" parent="V/H/V/TabContainer"] anchor_right = 1.0 anchor_bottom = 1.0 -margin_left = 25.0 -margin_top = 79.0 -margin_right = -25.0 -margin_bottom = -25.0 +margin_left = 40.0 +margin_top = 94.0 +margin_right = -40.0 +margin_bottom = -40.0 alignment = 1 -[node name="boardcolor1" parent="H/TabContainer/" instance=ExtResource( 5 )] -margin_left = 26.0 -margin_right = 220.0 +[node name="boardcolor1" parent="V/H/V/TabContainer/ board" instance=ExtResource( 5 )] +margin_left = 63.0 +margin_right = 257.0 margin_bottom = 54.0 size_flags_horizontal = 4 text = "boardcolor1" -[node name="boardcolor2" parent="H/TabContainer/" instance=ExtResource( 5 )] -margin_left = 26.0 +[node name="boardcolor2" parent="V/H/V/TabContainer/ board" instance=ExtResource( 5 )] +margin_left = 63.0 margin_top = 64.0 -margin_right = 220.0 +margin_right = 257.0 margin_bottom = 118.0 size_flags_horizontal = 4 text = "boardcolor2" -[node name="PieceSet" parent="H/TabContainer/" instance=ExtResource( 6 )] -margin_left = 23.0 +[node name="PieceSet" parent="V/H/V/TabContainer/ board" instance=ExtResource( 6 )] +margin_left = 60.0 margin_top = 128.0 -margin_right = 223.0 +margin_right = 260.0 margin_bottom = 188.0 rect_min_size = Vector2( 200, 60 ) size_flags_horizontal = 4 @@ -67,7 +92,7 @@ text = "piece set" icon = ExtResource( 7 ) offset = Vector2( 50, -50 ) -[node name="" type="VBoxContainer" parent="H/TabContainer"] +[node name=" win" type="VBoxContainer" parent="V/H/V/TabContainer"] visible = false anchor_right = 1.0 anchor_bottom = 1.0 @@ -78,44 +103,45 @@ margin_bottom = -30.0 mouse_filter = 2 alignment = 1 -[node name="FullscreenButton" type="Button" parent="H/TabContainer/"] -margin_left = 142.0 -margin_right = 391.0 -margin_bottom = 102.0 +[node name="FullscreenButton" type="Button" parent="V/H/V/TabContainer/ win"] +margin_left = 112.0 +margin_top = 12.0 +margin_right = 278.0 +margin_bottom = 66.0 focus_mode = 0 size_flags_horizontal = 4 toggle_mode = true text = "fullscreen" script = ExtResource( 3 ) -[node name="VsyncButton" type="Button" parent="H/TabContainer/"] -margin_left = 185.0 -margin_top = 117.0 -margin_right = 348.0 -margin_bottom = 219.0 +[node name="VsyncButton" type="Button" parent="V/H/V/TabContainer/ win"] +margin_left = 144.0 +margin_top = 76.0 +margin_right = 245.0 +margin_bottom = 130.0 focus_mode = 0 size_flags_horizontal = 4 toggle_mode = true text = "vsync" script = ExtResource( 3 ) -[node name="Borderless" type="Button" parent="H/TabContainer/"] -margin_left = 165.0 -margin_top = 234.0 -margin_right = 369.0 -margin_bottom = 336.0 +[node name="Borderless" type="Button" parent="V/H/V/TabContainer/ win"] +margin_left = 128.0 +margin_top = 140.0 +margin_right = 261.0 +margin_bottom = 194.0 focus_mode = 0 size_flags_horizontal = 4 toggle_mode = true text = "borders" script = ExtResource( 3 ) -[node name="" type="VBoxContainer" parent="H/TabContainer"] +[node name="misc" type="VBoxContainer" parent="V/H/V/TabContainer"] visible = false margin_right = 40.0 margin_bottom = 40.0 -[node name="rainbow" type="Button" parent="H/TabContainer/"] +[node name="rainbow" type="Button" parent="V/H/V/TabContainer/misc"] margin_right = 609.0 margin_bottom = 140.0 focus_mode = 0 @@ -124,32 +150,23 @@ text = "rgb background" align = 2 script = ExtResource( 3 ) -[node name="Container" type="VBoxContainer" parent="H"] -margin_left = 306.0 -margin_right = 806.0 -margin_bottom = 488.0 +[node name="V2" type="VBoxContainer" parent="V/H"] +margin_left = 440.0 +margin_right = 940.0 +margin_bottom = 434.0 rect_min_size = Vector2( 300, 0 ) custom_constants/separation = 0 -[node name="resetbutton" type="Button" parent="H/Container"] -margin_left = 162.0 -margin_right = 338.0 -margin_bottom = 54.0 -focus_mode = 0 -size_flags_horizontal = 4 -text = "reset all ﰇ" - -[node name="PreviewLabel" type="Label" parent="H/Container"] -margin_top = 54.0 +[node name="PreviewLabel" type="Label" parent="V/H/V2"] margin_right = 500.0 -margin_bottom = 88.0 +margin_bottom = 34.0 text = "Preview" align = 1 -[node name="Preview" type="GridContainer" parent="H/Container"] -margin_top = 88.0 +[node name="Preview" type="GridContainer" parent="V/H/V2"] +margin_top = 34.0 margin_right = 500.0 -margin_bottom = 488.0 +margin_bottom = 434.0 rect_min_size = Vector2( 500, 0 ) size_flags_horizontal = 4 custom_constants/vseparation = 0 @@ -160,13 +177,13 @@ __meta__ = { "_edit_group_": true } -[connection signal="changed" from="H/TabContainer//boardcolor1" to="." method="_on_boardcolor1_changed"] -[connection signal="newcolor" from="H/TabContainer//boardcolor1" to="." method="_on_boardcolor1_newcolor"] -[connection signal="changed" from="H/TabContainer//boardcolor2" to="." method="_on_boardcolor2_changed"] -[connection signal="newcolor" from="H/TabContainer//boardcolor2" to="." method="_on_boardcolor2_newcolor"] -[connection signal="selected" from="H/TabContainer//PieceSet" to="." method="_on_PieceSet_selected"] -[connection signal="toggled" from="H/TabContainer//FullscreenButton" to="." method="_on_FullscreenButton_toggled"] -[connection signal="toggled" from="H/TabContainer//VsyncButton" to="." method="_on_VsyncButton_toggled"] -[connection signal="toggled" from="H/TabContainer//Borderless" to="." method="_on_Borderless_toggled"] -[connection signal="toggled" from="H/TabContainer//rainbow" to="." method="_on_rainbow_toggled"] -[connection signal="pressed" from="H/Container/resetbutton" to="." method="_on_resetbutton_pressed"] +[connection signal="pressed" from="V/resetbutton" to="." method="_on_resetbutton_pressed"] +[connection signal="changed" from="V/H/V/TabContainer/ board/boardcolor1" to="." method="_on_boardcolor1_changed"] +[connection signal="newcolor" from="V/H/V/TabContainer/ board/boardcolor1" to="." method="_on_boardcolor1_newcolor"] +[connection signal="changed" from="V/H/V/TabContainer/ board/boardcolor2" to="." method="_on_boardcolor2_changed"] +[connection signal="newcolor" from="V/H/V/TabContainer/ board/boardcolor2" to="." method="_on_boardcolor2_newcolor"] +[connection signal="selected" from="V/H/V/TabContainer/ board/PieceSet" to="." method="_on_PieceSet_selected"] +[connection signal="toggled" from="V/H/V/TabContainer/ win/FullscreenButton" to="." method="_on_FullscreenButton_toggled"] +[connection signal="toggled" from="V/H/V/TabContainer/ win/VsyncButton" to="." method="_on_VsyncButton_toggled"] +[connection signal="toggled" from="V/H/V/TabContainer/ win/Borderless" to="." method="_on_Borderless_toggled"] +[connection signal="toggled" from="V/H/V/TabContainer/misc/rainbow" to="." method="_on_rainbow_toggled"] diff --git a/ui/menus/startmenu/StartMenu.tscn b/ui/menus/startmenu/StartMenu.tscn index 1d72749..5483ee1 100644 --- a/ui/menus/startmenu/StartMenu.tscn +++ b/ui/menus/startmenu/StartMenu.tscn @@ -29,10 +29,10 @@ mouse_filter = 2 theme = ExtResource( 2 ) [node name="tabs" type="TabContainer" parent="CenterContainer"] -margin_left = 283.0 -margin_top = 104.0 -margin_right = 1139.0 -margin_bottom = 696.0 +margin_left = 253.0 +margin_top = 89.0 +margin_right = 1169.0 +margin_bottom = 711.0 rect_min_size = Vector2( 2, 2 ) mouse_filter = 1 size_flags_horizontal = 0 @@ -40,49 +40,49 @@ size_flags_vertical = 0 drag_to_rearrange_enabled = true use_hidden_tabs_for_min_size = true -[node name="" type="TabContainer" parent="CenterContainer/tabs"] +[node name=" play" type="TabContainer" parent="CenterContainer/tabs"] anchor_right = 1.0 anchor_bottom = 1.0 -margin_left = 25.0 -margin_top = 79.0 -margin_right = -25.0 -margin_bottom = -25.0 +margin_left = 40.0 +margin_top = 94.0 +margin_right = -40.0 +margin_bottom = -40.0 -[node name="multiplayer" parent="CenterContainer/tabs/" instance=ExtResource( 5 )] -margin_left = 25.0 -margin_top = 79.0 -margin_right = -25.0 -margin_bottom = -25.0 +[node name=" multiplayer" parent="CenterContainer/tabs/ play" instance=ExtResource( 5 )] +margin_left = 40.0 +margin_top = 94.0 +margin_right = -40.0 +margin_bottom = -40.0 -[node name="local" parent="CenterContainer/tabs/" instance=ExtResource( 10 )] +[node name=" local play" parent="CenterContainer/tabs/ play" instance=ExtResource( 10 )] visible = false margin_left = 25.0 margin_top = 79.0 margin_right = -25.0 margin_bottom = -25.0 -[node name="漣" parent="CenterContainer/tabs" instance=ExtResource( 7 )] +[node name="漣 configure" parent="CenterContainer/tabs" instance=ExtResource( 7 )] visible = false margin_left = 30.0 margin_top = 60.0 margin_right = -30.0 margin_bottom = -30.0 -[node name="אּ" parent="CenterContainer/tabs" instance=ExtResource( 8 )] +[node name="אּ accounts" parent="CenterContainer/tabs" instance=ExtResource( 8 )] visible = false margin_left = 30.0 margin_top = 60.0 margin_right = -30.0 margin_bottom = -30.0 -[node name="ﭧ" parent="CenterContainer/tabs" instance=ExtResource( 6 )] +[node name="ﭧtests" parent="CenterContainer/tabs" instance=ExtResource( 6 )] visible = false margin_left = 30.0 margin_top = 60.0 margin_right = -30.0 margin_bottom = -30.0 -[node name="" type="Button" parent="CenterContainer/tabs"] +[node name=" exit" type="Button" parent="CenterContainer/tabs"] unique_name_in_owner = true visible = false anchor_right = 1.0 @@ -111,4 +111,4 @@ align = 2 valign = 1 script = ExtResource( 9 ) -[connection signal="pressed" from="CenterContainer/tabs/" to="." method="_on_quit_pressed"] +[connection signal="pressed" from="CenterContainer/tabs/ exit" to="." method="_on_quit_pressed"] diff --git a/ui/theme/main.theme b/ui/theme/main.theme Binary files differindex ae73fb9..b434bea 100644 --- a/ui/theme/main.theme +++ b/ui/theme/main.theme |