Player name

This commit is contained in:
2024-08-08 15:20:09 +08:00
parent f14a29d4e3
commit 91662a1c9f
8 changed files with 177 additions and 146 deletions

View File

@ -1,8 +1,8 @@
[gd_scene load_steps=2 format=3 uid="uid://bvll23f5ibd4v"]
[ext_resource type="Script" path="res://Scripts/UI/StartScreen.cs" id="1_f8by8"]
[ext_resource type="Script" path="res://Scripts/UI/LaunchScreen.cs" id="1_hiet3"]
[node name="StartScreen" type="Control" node_paths=PackedStringArray("ServerPortInput", "ServerAddrInput", "StartAsSingleButton", "StartAsServerButton", "StartAsClientButton")]
[node name="LaunchScreen" type="Control" node_paths=PackedStringArray("PlayerNameInput", "ServerPortInput", "ServerAddrInput", "StartAsServerButton", "StartAsClientButton")]
process_mode = 3
layout_mode = 3
anchors_preset = 15
@ -10,10 +10,10 @@ anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("1_f8by8")
script = ExtResource("1_hiet3")
PlayerNameInput = NodePath("CenterContainer/VBoxContainer/NameEdit")
ServerPortInput = NodePath("CenterContainer/VBoxContainer/PortEdit")
ServerAddrInput = NodePath("CenterContainer/VBoxContainer/AddrEdit")
StartAsSingleButton = NodePath("CenterContainer/VBoxContainer/PlayAloneButton")
StartAsServerButton = NodePath("CenterContainer/VBoxContainer/MultiplayerActions/HostButton")
StartAsClientButton = NodePath("CenterContainer/VBoxContainer/MultiplayerActions/ConnectButton")
@ -25,18 +25,13 @@ offset_bottom = 648.0
[node name="VBoxContainer" type="VBoxContainer" parent="CenterContainer"]
layout_mode = 2
[node name="SinglePlayerTitle" type="Label" parent="CenterContainer/VBoxContainer"]
[node name="NameEdit" type="LineEdit" parent="CenterContainer/VBoxContainer"]
layout_mode = 2
text = "Singleplayer"
horizontal_alignment = 1
[node name="PlayAloneButton" type="Button" parent="CenterContainer/VBoxContainer"]
layout_mode = 2
text = "Play Alone"
placeholder_text = "Player name"
[node name="MultiplayerTitle" type="Label" parent="CenterContainer/VBoxContainer"]
layout_mode = 2
text = "Mutiplayer"
text = "Play the Game"
horizontal_alignment = 1
[node name="PortEdit" type="LineEdit" parent="CenterContainer/VBoxContainer"]