summaryrefslogtreecommitdiff
path: root/pages
diff options
context:
space:
mode:
Diffstat (limited to 'pages')
-rw-r--r--pages/GameTable.tscn55
-rw-r--r--pages/ServerBrowser.tscn196
2 files changed, 251 insertions, 0 deletions
diff --git a/pages/GameTable.tscn b/pages/GameTable.tscn
new file mode 100644
index 0000000..1e3e3db
--- /dev/null
+++ b/pages/GameTable.tscn
@@ -0,0 +1,55 @@
+[gd_scene load_steps=7 format=2]
+
+[ext_resource path="res://scripts/GameTable.gd" type="Script" id=1]
+[ext_resource path="res://textures/wood_board_knotty.png" type="Texture" id=2]
+[ext_resource path="res://objects/Plane.tscn" type="PackedScene" id=3]
+
+[sub_resource type="Environment" id=1]
+background_mode = 1
+background_energy = 0.0
+ambient_light_color = Color( 1, 0.960784, 0.921569, 1 )
+ambient_light_energy = 0.5
+ambient_light_sky_contribution = 0.0
+fog_enabled = true
+fog_color = Color( 0, 0, 0, 1 )
+fog_depth_end = 20.0
+
+[sub_resource type="SpatialMaterial" id=2]
+albedo_color = Color( 0.345098, 0.282353, 0.184314, 1 )
+albedo_texture = ExtResource( 2 )
+
+[sub_resource type="QuadMesh" id=3]
+material = SubResource( 2 )
+size = Vector2( 30, 30 )
+
+[node name="GameTable" type="Spatial"]
+script = ExtResource( 1 )
+game_difficulty = "hard"
+
+[node name="Board" type="Spatial" parent="."]
+
+[node name="ActivePieces" type="Spatial" parent="."]
+
+[node name="SpotLight" type="SpotLight" parent="."]
+transform = Transform( 1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, 0, 15.3023, 0 )
+light_color = Color( 1, 0.941176, 0.733333, 1 )
+light_energy = 1.512
+light_specular = 0.0
+shadow_enabled = true
+spot_range = 45.4139
+
+[node name="WorldEnvironment" type="WorldEnvironment" parent="."]
+environment = SubResource( 1 )
+
+[node name="Camera" type="Camera" parent="."]
+transform = Transform( 1, 0, 0, 0, 0.965939, 0.258768, 0, -0.258768, 0.965939, 0, 3.30213, 10.1497 )
+
+[node name="Tabletop" type="MeshInstance" parent="."]
+transform = Transform( 1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, 0, 0, 0 )
+mesh = SubResource( 3 )
+
+[node name="Plane" parent="." instance=ExtResource( 3 )]
+transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0.625405, 1.50965, -2.27158 )
+
+[node name="Plane2" parent="." instance=ExtResource( 3 )]
+transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -0.92594, 0.711815, -1.28117 )
diff --git a/pages/ServerBrowser.tscn b/pages/ServerBrowser.tscn
new file mode 100644
index 0000000..c4fcc61
--- /dev/null
+++ b/pages/ServerBrowser.tscn
@@ -0,0 +1,196 @@
+[gd_scene load_steps=6 format=2]
+
+[ext_resource path="res://network/websocket_client.gd" type="Script" id=1]
+[ext_resource path="res://scripts/ServerBrowser.gd" type="Script" id=2]
+
+[sub_resource type="Gradient" id=15]
+offsets = PoolRealArray( 0 )
+colors = PoolColorArray( 0, 0, 0, 1 )
+
+[sub_resource type="GradientTexture2D" id=21]
+gradient = SubResource( 15 )
+width = 32
+height = 32
+
+[sub_resource type="GDScript" id=14]
+resource_name = "set_colors_builtin"
+script/source = "extends OptionButton
+
+
+func _ready():
+ for i in range(get_item_count()):
+ set_item_icon(i, get_item_icon(i).duplicate())
+ var icon = get_item_icon(i)
+ icon.gradient = icon.gradient.duplicate()
+ icon.gradient.set_color(0, Globals.colors[i])
+ print(icon.gradient.colors)
+ icon.gradient.colors.remove(0)
+
+
+"
+
+[node name="ServerBrowser" type="Control"]
+anchor_right = 1.0
+anchor_bottom = 1.0
+script = ExtResource( 2 )
+
+[node name="HostButton" type="Button" parent="."]
+margin_left = 688.0
+margin_top = 349.0
+margin_right = 772.0
+margin_bottom = 369.0
+text = "Host Game"
+
+[node name="UsernameLabel" type="Label" parent="."]
+margin_left = 676.0
+margin_top = 100.0
+margin_right = 1074.0
+margin_bottom = 144.0
+text = "Username:"
+
+[node name="ColorLabel" type="Label" parent="."]
+margin_left = 680.0
+margin_top = 132.0
+margin_right = 1078.0
+margin_bottom = 176.0
+text = "Color:"
+
+[node name="AltColorLabel" type="Label" parent="."]
+margin_left = 681.0
+margin_top = 160.0
+margin_right = 1079.0
+margin_bottom = 204.0
+text = "Alt color:"
+
+[node name="JoinButton" type="Button" parent="."]
+margin_left = 689.0
+margin_top = 316.0
+margin_right = 724.0
+margin_bottom = 336.0
+disabled = true
+text = "Join"
+
+[node name="RefreshButton" type="Button" parent="."]
+margin_left = 420.0
+margin_top = 388.0
+margin_right = 551.0
+margin_bottom = 408.0
+text = "Refresh Server List"
+
+[node name="GameList" type="ItemList" parent="."]
+margin_left = 314.0
+margin_top = 89.0
+margin_right = 614.0
+margin_bottom = 367.0
+
+[node name="Username" type="LineEdit" parent="."]
+margin_left = 756.0
+margin_top = 94.0
+margin_right = 870.0
+margin_bottom = 118.0
+text = "Player"
+max_length = 32
+
+[node name="HostPopup" type="PopupPanel" parent="."]
+margin_left = 383.0
+margin_top = 129.0
+margin_right = 633.0
+margin_bottom = 399.0
+
+[node name="Control" type="Control" parent="HostPopup"]
+margin_left = 4.0
+margin_top = 4.0
+margin_right = 246.0
+margin_bottom = 266.0
+
+[node name="GameName" type="LineEdit" parent="HostPopup/Control"]
+margin_left = 41.0
+margin_top = 22.0
+margin_right = 192.0
+margin_bottom = 55.0
+text = "Player's Game"
+max_length = 39
+
+[node name="HostConfirmButton" type="Button" parent="HostPopup/Control"]
+margin_left = 99.0
+margin_top = 208.0
+margin_right = 212.0
+margin_bottom = 244.0
+text = "Host"
+
+[node name="PlayerCount" type="OptionButton" parent="HostPopup/Control"]
+margin_left = 120.0
+margin_top = 68.0
+margin_right = 216.0
+margin_bottom = 99.0
+text = "2"
+items = [ "2", null, false, 2, null, "3", null, false, 3, null, "4", null, false, 4, null, "5", null, false, 5, null, "6", null, false, 6, null ]
+selected = 0
+
+[node name="CancelHostButton" type="Button" parent="HostPopup/Control"]
+margin_left = 30.0
+margin_top = 209.0
+margin_right = 84.0
+margin_bottom = 243.0
+text = "Cancel"
+
+[node name="PlayerCountLabel" type="Label" parent="HostPopup/Control"]
+margin_left = 26.0
+margin_top = 80.0
+margin_right = 76.0
+margin_bottom = 94.0
+text = "Players:"
+
+[node name="PrivateToggle" type="CheckButton" parent="HostPopup/Control"]
+margin_left = 22.0
+margin_top = 116.0
+margin_right = 228.0
+margin_bottom = 156.0
+size_flags_horizontal = 0
+size_flags_vertical = 0
+text = "Password Protected"
+
+[node name="Password" type="LineEdit" parent="HostPopup/Control"]
+visible = false
+anchor_left = 0.1
+anchor_right = 0.9
+margin_top = 169.0
+margin_bottom = 193.0
+max_length = 16
+placeholder_text = "Password"
+placeholder_alpha = 0.587
+
+[node name="PlayerColor" type="OptionButton" parent="."]
+margin_left = 758.0
+margin_top = 124.0
+margin_right = 804.0
+margin_bottom = 147.0
+icon = SubResource( 21 )
+expand_icon = true
+items = [ "", SubResource( 21 ), false, 0, null, "", SubResource( 21 ), false, 1, null, "", SubResource( 21 ), false, 2, null, "", SubResource( 21 ), false, 3, null, "", SubResource( 21 ), false, 4, null, "", SubResource( 21 ), false, 5, null, "", SubResource( 21 ), false, 6, null, "", SubResource( 21 ), false, 7, null, "", SubResource( 21 ), false, 8, null, "", SubResource( 21 ), false, 9, null ]
+selected = 0
+script = SubResource( 14 )
+
+[node name="AltPlayerColor" type="OptionButton" parent="."]
+margin_left = 758.0
+margin_top = 155.0
+margin_right = 804.0
+margin_bottom = 178.0
+icon = SubResource( 21 )
+expand_icon = true
+items = [ "", SubResource( 21 ), false, 0, null, "", SubResource( 21 ), false, 1, null, "", SubResource( 21 ), false, 2, null, "", SubResource( 21 ), false, 3, null, "", SubResource( 21 ), false, 4, null, "", SubResource( 21 ), false, 5, null, "", SubResource( 21 ), false, 6, null, "", SubResource( 21 ), false, 7, null, "", SubResource( 21 ), false, 8, null, "", SubResource( 21 ), false, 9, null ]
+selected = 0
+script = SubResource( 14 )
+
+[node name="GameCoordinator" type="Node" parent="."]
+script = ExtResource( 1 )
+
+[node name="GameCoordinatorStatus" type="Label" parent="."]
+margin_left = 154.0
+margin_top = 31.0
+margin_right = 354.0
+margin_bottom = 45.0
+text = "Game Coordinator Connection: "
+
+[connection signal="pressed" from="HostButton" to="HostPopup" method="popup_centered" binds= [ Vector2( 250, 270 ) ]]
+[connection signal="pressed" from="HostPopup/Control/CancelHostButton" to="HostPopup" method="set_visible" binds= [ false ]]