mlpcardgame/Scenes/Lobby.tscn

389 lines
11 KiB
Text

[gd_scene load_steps=11 format=2]
[ext_resource path="res://Scenes/Scripts/Lobby.gd" type="Script" id=1]
[ext_resource path="res://MLPAssets/Background/menubg.webp" type="Texture" id=2]
[ext_resource path="res://UIAssets/UITheme.tres" type="Theme" id=3]
[ext_resource path="res://UIAssets/Fonts/Catamaran-Bold.ttf" type="DynamicFontData" id=4]
[ext_resource path="res://UIAssets/Fonts/UIDialogLabel.tres" type="DynamicFont" id=5]
[ext_resource path="res://UIAssets/Fonts/Catamaran.tres" type="DynamicFont" id=6]
[ext_resource path="res://UIAssets/Fonts/Catamaran-Light.ttf" type="DynamicFontData" id=7]
[sub_resource type="DynamicFont" id=4]
size = 30
font_data = ExtResource( 4 )
[sub_resource type="DynamicFont" id=2]
font_data = ExtResource( 7 )
[sub_resource type="DynamicFont" id=3]
size = 20
use_mipmaps = true
use_filter = true
font_data = ExtResource( 7 )
[node name="Lobby" type="Control"]
anchor_right = 1.0
anchor_bottom = 1.0
script = ExtResource( 1 )
[node name="Background" type="TextureRect" parent="."]
anchor_right = 1.0
anchor_bottom = 1.0
margin_left = -1.29236
margin_right = -1.29236
texture = ExtResource( 2 )
expand = true
stretch_mode = 7
[node name="RoomScroll" type="ScrollContainer" parent="."]
anchor_right = 1.0
anchor_bottom = 1.0
margin_left = 30.0
margin_top = 100.0
margin_right = -30.0
margin_bottom = -300.0
scroll_horizontal_enabled = false
[node name="RoomList" type="VBoxContainer" parent="RoomScroll"]
margin_right = 1220.0
margin_bottom = 400.0
size_flags_horizontal = 3
size_flags_vertical = 3
[node name="NewRoom" type="Button" parent="."]
anchor_left = 1.0
anchor_right = 1.0
margin_left = -130.0
margin_top = 60.0
margin_right = -30.0
margin_bottom = 90.0
text = "Create room"
[node name="CreateRoomDialog" type="PopupDialog" parent="."]
visible = true
margin_left = 377.0
margin_top = 109.0
margin_right = 967.0
margin_bottom = 647.0
theme = ExtResource( 3 )
[node name="DialogElements" type="VBoxContainer" parent="CreateRoomDialog"]
anchor_right = 1.0
anchor_bottom = 1.0
margin_left = 10.0
margin_top = 10.0
margin_right = -10.0
margin_bottom = -10.0
theme = ExtResource( 3 )
[node name="Title" type="Label" parent="CreateRoomDialog/DialogElements"]
margin_right = 570.0
margin_bottom = 50.0
theme = ExtResource( 3 )
custom_fonts/font = SubResource( 4 )
text = "Create new room"
align = 1
valign = 1
[node name="RoomRow1" type="HBoxContainer" parent="CreateRoomDialog/DialogElements"]
margin_top = 54.0
margin_right = 570.0
margin_bottom = 134.0
theme = ExtResource( 3 )
custom_constants/separation = 20
alignment = 1
[node name="GameType" type="VBoxContainer" parent="CreateRoomDialog/DialogElements/RoomRow1"]
margin_left = 25.0
margin_right = 225.0
margin_bottom = 80.0
rect_min_size = Vector2( 200, 0 )
theme = ExtResource( 3 )
alignment = 2
[node name="NameLabel" type="Label" parent="CreateRoomDialog/DialogElements/RoomRow1/GameType"]
margin_top = 4.0
margin_right = 200.0
margin_bottom = 37.0
theme = ExtResource( 3 )
custom_fonts/font = ExtResource( 5 )
custom_colors/font_color = Color( 0.666667, 0.666667, 0.666667, 1 )
text = "Game Type"
align = 1
valign = 1
[node name="Dropdown" type="OptionButton" parent="CreateRoomDialog/DialogElements/RoomRow1/GameType"]
margin_top = 41.0
margin_right = 200.0
margin_bottom = 80.0
theme = ExtResource( 3 )
custom_fonts/font = ExtResource( 5 )
shortcut_in_tooltip = false
[node name="RoomName" type="VBoxContainer" parent="CreateRoomDialog/DialogElements/RoomRow1"]
margin_left = 245.0
margin_right = 545.0
margin_bottom = 80.0
rect_min_size = Vector2( 200, 0 )
theme = ExtResource( 3 )
alignment = 2
[node name="NameLabel" type="Label" parent="CreateRoomDialog/DialogElements/RoomRow1/RoomName"]
margin_right = 300.0
margin_bottom = 33.0
theme = ExtResource( 3 )
custom_fonts/font = ExtResource( 5 )
custom_colors/font_color = Color( 0.666667, 0.666667, 0.666667, 1 )
text = "Room Name"
align = 1
valign = 1
[node name="LineEdit" type="LineEdit" parent="CreateRoomDialog/DialogElements/RoomRow1/RoomName"]
margin_top = 37.0
margin_right = 300.0
margin_bottom = 80.0
rect_min_size = Vector2( 300, 0 )
theme = ExtResource( 3 )
custom_fonts/font = ExtResource( 5 )
placeholder_text = "Room name"
[node name="RoomRow2" type="HBoxContainer" parent="CreateRoomDialog/DialogElements"]
editor/display_folded = true
margin_top = 138.0
margin_right = 570.0
margin_bottom = 226.0
theme = ExtResource( 3 )
custom_constants/separation = 20
alignment = 1
[node name="MaxPlayers" type="VBoxContainer" parent="CreateRoomDialog/DialogElements/RoomRow2"]
margin_left = 75.0
margin_right = 275.0
margin_bottom = 88.0
rect_min_size = Vector2( 200, 0 )
theme = ExtResource( 3 )
alignment = 2
[node name="NameLabel" type="Label" parent="CreateRoomDialog/DialogElements/RoomRow2/MaxPlayers"]
margin_top = 8.0
margin_right = 200.0
margin_bottom = 41.0
theme = ExtResource( 3 )
custom_colors/font_color = Color( 0.666667, 0.666667, 0.666667, 1 )
text = "Max # of players"
align = 1
valign = 1
[node name="Spinner" type="SpinBox" parent="CreateRoomDialog/DialogElements/RoomRow2/MaxPlayers"]
margin_top = 45.0
margin_right = 200.0
margin_bottom = 88.0
theme = ExtResource( 3 )
max_value = 20.0
value = 8.0
align = 1
[node name="MaxSpec" type="VBoxContainer" parent="CreateRoomDialog/DialogElements/RoomRow2"]
margin_left = 295.0
margin_right = 495.0
margin_bottom = 88.0
rect_min_size = Vector2( 200, 0 )
theme = ExtResource( 3 )
alignment = 2
[node name="NameLabel" type="CheckBox" parent="CreateRoomDialog/DialogElements/RoomRow2/MaxSpec"]
margin_right = 200.0
margin_bottom = 41.0
theme = ExtResource( 3 )
custom_fonts/font = ExtResource( 5 )
custom_colors/font_color = Color( 0.666667, 0.666667, 0.666667, 1 )
text = "Max # of spectators"
align = 1
[node name="Spinner" type="SpinBox" parent="CreateRoomDialog/DialogElements/RoomRow2/MaxSpec"]
margin_top = 45.0
margin_right = 200.0
margin_bottom = 88.0
theme = ExtResource( 3 )
max_value = 20.0
align = 1
editable = false
[node name="DraftRows" type="VBoxContainer" parent="CreateRoomDialog/DialogElements"]
margin_top = 230.0
margin_right = 570.0
margin_bottom = 440.0
[node name="DraftOptions" type="Label" parent="CreateRoomDialog/DialogElements/DraftRows"]
margin_right = 570.0
margin_bottom = 50.0
theme = ExtResource( 3 )
custom_fonts/font = SubResource( 4 )
text = "Draft options"
align = 1
valign = 1
[node name="DraftRow1" type="HBoxContainer" parent="CreateRoomDialog/DialogElements/DraftRows"]
margin_top = 54.0
margin_right = 570.0
margin_bottom = 130.0
theme = ExtResource( 3 )
custom_constants/separation = 20
alignment = 1
[node name="DraftType" type="VBoxContainer" parent="CreateRoomDialog/DialogElements/DraftRows/DraftRow1"]
margin_left = 85.0
margin_right = 485.0
margin_bottom = 76.0
rect_min_size = Vector2( 200, 0 )
theme = ExtResource( 3 )
alignment = 2
[node name="NameLabel" type="Label" parent="CreateRoomDialog/DialogElements/DraftRows/DraftRow1/DraftType"]
margin_right = 400.0
margin_bottom = 33.0
theme = ExtResource( 3 )
custom_colors/font_color = Color( 0.666667, 0.666667, 0.666667, 1 )
text = "Draft type"
align = 1
valign = 1
[node name="Dropdown" type="OptionButton" parent="CreateRoomDialog/DialogElements/DraftRows/DraftRow1/DraftType"]
margin_top = 37.0
margin_right = 400.0
margin_bottom = 76.0
rect_min_size = Vector2( 400, 0 )
theme = ExtResource( 3 )
custom_fonts/font = ExtResource( 5 )
shortcut_in_tooltip = false
[node name="DraftRowBlock" type="HBoxContainer" parent="CreateRoomDialog/DialogElements/DraftRows"]
margin_top = 134.0
margin_right = 570.0
margin_bottom = 210.0
theme = ExtResource( 3 )
custom_constants/separation = 20
alignment = 1
[node name="DraftBlock" type="VBoxContainer" parent="CreateRoomDialog/DialogElements/DraftRows/DraftRowBlock"]
margin_left = 85.0
margin_right = 485.0
margin_bottom = 76.0
rect_min_size = Vector2( 200, 0 )
theme = ExtResource( 3 )
alignment = 2
[node name="NameLabel" type="Label" parent="CreateRoomDialog/DialogElements/DraftRows/DraftRowBlock/DraftBlock"]
margin_right = 400.0
margin_bottom = 33.0
theme = ExtResource( 3 )
custom_colors/font_color = Color( 0.666667, 0.666667, 0.666667, 1 )
text = "Block"
align = 1
valign = 1
[node name="Dropdown" type="OptionButton" parent="CreateRoomDialog/DialogElements/DraftRows/DraftRowBlock/DraftBlock"]
margin_top = 37.0
margin_right = 400.0
margin_bottom = 76.0
rect_min_size = Vector2( 400, 0 )
theme = ExtResource( 3 )
custom_fonts/font = ExtResource( 5 )
shortcut_in_tooltip = false
[node name="DraftCubeURL" type="HBoxContainer" parent="CreateRoomDialog/DialogElements/DraftRows"]
visible = false
margin_top = 134.0
margin_right = 570.0
margin_bottom = 214.0
theme = ExtResource( 3 )
custom_constants/separation = 20
alignment = 1
[node name="CubeURL" type="VBoxContainer" parent="CreateRoomDialog/DialogElements/DraftRows/DraftCubeURL"]
margin_left = 85.0
margin_right = 485.0
margin_bottom = 80.0
rect_min_size = Vector2( 200, 0 )
theme = ExtResource( 3 )
alignment = 2
[node name="NameLabel" type="Label" parent="CreateRoomDialog/DialogElements/DraftRows/DraftCubeURL/CubeURL"]
margin_right = 400.0
margin_bottom = 33.0
theme = ExtResource( 3 )
custom_colors/font_color = Color( 0.666667, 0.666667, 0.666667, 1 )
text = "Cube URL"
align = 1
valign = 1
[node name="LineEdit" type="LineEdit" parent="CreateRoomDialog/DialogElements/DraftRows/DraftCubeURL/CubeURL"]
margin_top = 37.0
margin_right = 400.0
margin_bottom = 80.0
rect_min_size = Vector2( 400, 0 )
theme = ExtResource( 3 )
custom_fonts/font = ExtResource( 5 )
placeholder_text = "URL to cube file"
[node name="Button" type="Button" parent="CreateRoomDialog"]
anchor_top = 1.0
anchor_bottom = 1.0
margin_left = 28.0
margin_top = -70.0
margin_right = 558.0
margin_bottom = -28.0
theme = ExtResource( 3 )
text = "Create room"
[node name="ChooseNameDialog" type="PopupDialog" parent="."]
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
margin_right = 400.0
margin_bottom = 200.0
rect_min_size = Vector2( 400, 200 )
popup_exclusive = true
[node name="Prompt" type="Label" parent="ChooseNameDialog"]
anchor_right = 1.0
anchor_bottom = 1.0
margin_right = 394.0
margin_bottom = 13.0
rect_scale = Vector2( 0.5, 0.5 )
custom_fonts/font = ExtResource( 6 )
text = "Choose a name"
align = 1
valign = 1
[node name="Confirm" type="Label" parent="ChooseNameDialog"]
visible = false
anchor_right = 1.0
anchor_bottom = 1.0
margin_left = 13.4599
margin_top = 159.388
margin_right = -14.5401
margin_bottom = -13.6124
custom_fonts/font = SubResource( 2 )
custom_colors/font_color = Color( 0.666667, 0.666667, 0.666667, 1 )
text = "Press return to confirm"
align = 1
valign = 1
[node name="Name" type="LineEdit" parent="ChooseNameDialog"]
anchor_right = 1.0
anchor_bottom = 1.0
margin_left = 90.825
margin_top = 100.0
margin_right = -90.0
margin_bottom = -60.0
custom_fonts/font = SubResource( 3 )
align = 1
placeholder_text = "Player name"
[connection signal="pressed" from="NewRoom" to="." method="_create_room"]
[connection signal="item_selected" from="CreateRoomDialog/DialogElements/RoomRow1/GameType/Dropdown" to="." method="_game_type_selected"]
[connection signal="toggled" from="CreateRoomDialog/DialogElements/RoomRow2/MaxSpec/NameLabel" to="." method="_toggle_spectators"]
[connection signal="item_selected" from="CreateRoomDialog/DialogElements/DraftRows/DraftRow1/DraftType/Dropdown" to="." method="_draft_type_selected"]
[connection signal="text_changed" from="ChooseNameDialog/Name" to="." method="_name_changed"]
[connection signal="text_entered" from="ChooseNameDialog/Name" to="." method="_name_chosen"]