mirror of
https://gitlab.com/open-fpsz/open-fpsz.git
synced 2026-07-11 22:44:45 +00:00
✅ Refactoring and added unit testing framework
This commit is contained in:
parent
06346b2d98
commit
080ce479da
145 changed files with 16250 additions and 470 deletions
|
|
@ -1,29 +1,79 @@
|
|||
[gd_scene load_steps=6 format=3 uid="uid://bjctlqvs33nqy"]
|
||||
[gd_scene load_steps=7 format=3 uid="uid://bjctlqvs33nqy"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://c1tjamjm8qjog" path="res://interfaces/menus/boot/background.webp" id="1_ph586"]
|
||||
[ext_resource type="PackedScene" uid="uid://1seg8cvss7a7" path="res://interfaces/menus/boot/multiplayer.tscn" id="2_lcb0h"]
|
||||
|
||||
[sub_resource type="GDScript" id="GDScript_jd8xf"]
|
||||
resource_name = "MainMenu"
|
||||
script/source = "extends CanvasLayer
|
||||
class_name MainMenu
|
||||
script/source = "class_name BootMenu extends CanvasLayer
|
||||
|
||||
signal start_demo
|
||||
signal start_server(peer)
|
||||
signal join_server(peer)
|
||||
|
||||
func _ready():
|
||||
$Multiplayer.start_server.connect(_on_start_server)
|
||||
$Multiplayer.join_server.connect(_on_join_server)
|
||||
|
||||
func _on_demo_pressed():
|
||||
start_demo.emit()
|
||||
"
|
||||
|
||||
func _on_start_server(peer):
|
||||
start_server.emit(peer)
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_krqeq"]
|
||||
bg_color = Color(0.5, 0.5, 0.5, 0.25)
|
||||
|
||||
func _on_join_server(peer):
|
||||
join_server.emit(peer)
|
||||
[sub_resource type="GDScript" id="GDScript_tc1bm"]
|
||||
script/source = "class_name MultiplayerPanel extends PanelContainer
|
||||
|
||||
const DEFAULT_HOST : String = \"localhost\"
|
||||
const DEFAULT_PORT : int = 9000
|
||||
|
||||
var _join_address = RegEx.new()
|
||||
var _registered_ports = RegEx.new()
|
||||
|
||||
signal start_server(port)
|
||||
signal join_server(host, port)
|
||||
|
||||
@onready var modal : Control = $Modal
|
||||
@onready var menu : CanvasLayer = get_parent()
|
||||
|
||||
func _ready():
|
||||
# see https://datatracker.ietf.org/doc/html/rfc1700
|
||||
_registered_ports.compile(r'^(?:102[4-9]|10[3-9]\\d|1[1-9]\\d{2}|[2-9]\\d{3}|[1-5]\\d{4}|6[0-4]\\d{3}|65[0-4]\\d{2}|655[0-2]\\d|6553[0-5])$')
|
||||
_join_address.compile(r'^(?<host>[a-zA-Z0-9.-]+)(:(?<port>:102[4-9]|10[3-9]\\d|1[1-9]\\d{2}|[2-9]\\d{3}|[1-5]\\d{4}|6[0-4]\\d{3}|65[0-4]\\d{2}|655[0-2]\\d|6553[0-5]))?$')
|
||||
hide() # start hidden
|
||||
|
||||
func _on_menu_pressed():
|
||||
hide()
|
||||
owner.get_node(\"Main\").show()
|
||||
|
||||
func _on_quit_pressed():
|
||||
get_tree().quit()
|
||||
|
||||
func _on_host_pressed():
|
||||
var port = DEFAULT_PORT
|
||||
# check for registered ports number matches
|
||||
if %ServerPort.text:
|
||||
var result = _registered_ports.search(%ServerPort.text)
|
||||
if result: # port is valid
|
||||
port = int(result.get_string())
|
||||
else: # port is not valid
|
||||
push_warning(\"A valid port number in the range 1024-65535 is required.\")
|
||||
return
|
||||
|
||||
start_server.emit(port)
|
||||
|
||||
func _on_join_pressed():
|
||||
var addr = [DEFAULT_HOST, DEFAULT_PORT]
|
||||
# validate join address input
|
||||
var result = _join_address.search(%JoinAddress.text)
|
||||
if result: # address is valid
|
||||
addr[0] = result.get_string(\"host\")
|
||||
var rport = result.get_string(\"port\")
|
||||
if rport: addr[1] = int(rport)
|
||||
|
||||
$Modal.show()
|
||||
join_server.emit(addr[0], addr[1])
|
||||
|
||||
func _on_connected_to_server():
|
||||
$Modal.hide()
|
||||
menu.hide()
|
||||
|
||||
func _on_connection_failed():
|
||||
$Modal.hide()
|
||||
"
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_snh7i"]
|
||||
|
|
@ -32,9 +82,6 @@ bg_color = Color(0, 0.5, 0.5, 0.25)
|
|||
[sub_resource type="GDScript" id="GDScript_yqbr7"]
|
||||
script/source = "extends PanelContainer
|
||||
|
||||
const PLAYER = preload(\"res://characters/player/player.tscn\")
|
||||
const MAP = preload(\"res://maps/genesis/genesis.tscn\")
|
||||
|
||||
func _on_multiplayer_pressed():
|
||||
hide()
|
||||
owner.get_node(\"Multiplayer\").show()
|
||||
|
|
@ -43,7 +90,7 @@ func _on_quit_pressed():
|
|||
get_tree().quit()
|
||||
"
|
||||
|
||||
[node name="MainMenu" type="CanvasLayer"]
|
||||
[node name="BootMenu" type="CanvasLayer"]
|
||||
script = SubResource("GDScript_jd8xf")
|
||||
|
||||
[node name="TextureRect" type="TextureRect" parent="."]
|
||||
|
|
@ -56,8 +103,208 @@ mouse_filter = 2
|
|||
texture = ExtResource("1_ph586")
|
||||
stretch_mode = 6
|
||||
|
||||
[node name="Multiplayer" parent="." instance=ExtResource("2_lcb0h")]
|
||||
[node name="Multiplayer" type="PanelContainer" parent="."]
|
||||
visible = false
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
theme_override_styles/panel = SubResource("StyleBoxFlat_krqeq")
|
||||
script = SubResource("GDScript_tc1bm")
|
||||
|
||||
[node name="MarginContainer" type="MarginContainer" parent="Multiplayer"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/margin_left = 20
|
||||
theme_override_constants/margin_top = 20
|
||||
theme_override_constants/margin_right = 20
|
||||
theme_override_constants/margin_bottom = 20
|
||||
|
||||
[node name="TabContainer" type="TabContainer" parent="Multiplayer/MarginContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/side_margin = 0
|
||||
|
||||
[node name="Profile" type="TabBar" parent="Multiplayer/MarginContainer/TabContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/h_separation = 0
|
||||
|
||||
[node name="MarginContainer" type="MarginContainer" parent="Multiplayer/MarginContainer/TabContainer/Profile"]
|
||||
layout_mode = 0
|
||||
offset_right = 1116.0
|
||||
offset_bottom = 577.0
|
||||
theme_override_constants/margin_left = 20
|
||||
theme_override_constants/margin_top = 20
|
||||
theme_override_constants/margin_right = 20
|
||||
theme_override_constants/margin_bottom = 20
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="Multiplayer/MarginContainer/TabContainer/Profile/MarginContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 20
|
||||
|
||||
[node name="LeftBox" type="VBoxContainer" parent="Multiplayer/MarginContainer/TabContainer/Profile/MarginContainer/HBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_stretch_ratio = 0.25
|
||||
|
||||
[node name="Create" type="Button" parent="Multiplayer/MarginContainer/TabContainer/Profile/MarginContainer/HBoxContainer/LeftBox"]
|
||||
layout_mode = 2
|
||||
disabled = true
|
||||
text = "Create"
|
||||
|
||||
[node name="Delete" type="Button" parent="Multiplayer/MarginContainer/TabContainer/Profile/MarginContainer/HBoxContainer/LeftBox"]
|
||||
layout_mode = 2
|
||||
disabled = true
|
||||
text = "Delete"
|
||||
|
||||
[node name="Spacer" type="MarginContainer" parent="Multiplayer/MarginContainer/TabContainer/Profile/MarginContainer/HBoxContainer/LeftBox"]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 3
|
||||
|
||||
[node name="Menu" type="Button" parent="Multiplayer/MarginContainer/TabContainer/Profile/MarginContainer/HBoxContainer/LeftBox"]
|
||||
layout_mode = 2
|
||||
text = "Menu
|
||||
"
|
||||
|
||||
[node name="Quit" type="Button" parent="Multiplayer/MarginContainer/TabContainer/Profile/MarginContainer/HBoxContainer/LeftBox"]
|
||||
layout_mode = 2
|
||||
text = "Quit"
|
||||
|
||||
[node name="RightBox" type="VBoxContainer" parent="Multiplayer/MarginContainer/TabContainer/Profile/MarginContainer/HBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
|
||||
[node name="Label" type="Label" parent="Multiplayer/MarginContainer/TabContainer/Profile/MarginContainer/HBoxContainer/RightBox"]
|
||||
layout_mode = 2
|
||||
text = "Current Profile:"
|
||||
|
||||
[node name="ProfileName" type="LineEdit" parent="Multiplayer/MarginContainer/TabContainer/Profile/MarginContainer/HBoxContainer/RightBox"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
text = "Newblood"
|
||||
|
||||
[node name="Join" type="TabBar" parent="Multiplayer/MarginContainer/TabContainer"]
|
||||
visible = false
|
||||
layout_mode = 2
|
||||
select_with_rmb = true
|
||||
|
||||
[node name="MarginContainer" type="MarginContainer" parent="Multiplayer/MarginContainer/TabContainer/Join"]
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
theme_override_constants/margin_left = 20
|
||||
theme_override_constants/margin_top = 20
|
||||
theme_override_constants/margin_right = 20
|
||||
theme_override_constants/margin_bottom = 20
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="Multiplayer/MarginContainer/TabContainer/Join/MarginContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 10
|
||||
|
||||
[node name="LeftBox" type="VBoxContainer" parent="Multiplayer/MarginContainer/TabContainer/Join/MarginContainer/HBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_stretch_ratio = 0.25
|
||||
|
||||
[node name="Join" type="Button" parent="Multiplayer/MarginContainer/TabContainer/Join/MarginContainer/HBoxContainer/LeftBox"]
|
||||
layout_mode = 2
|
||||
text = "Join"
|
||||
|
||||
[node name="Spacer" type="MarginContainer" parent="Multiplayer/MarginContainer/TabContainer/Join/MarginContainer/HBoxContainer/LeftBox"]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 3
|
||||
|
||||
[node name="Menu" type="Button" parent="Multiplayer/MarginContainer/TabContainer/Join/MarginContainer/HBoxContainer/LeftBox"]
|
||||
layout_mode = 2
|
||||
text = "Menu
|
||||
"
|
||||
|
||||
[node name="Quit" type="Button" parent="Multiplayer/MarginContainer/TabContainer/Join/MarginContainer/HBoxContainer/LeftBox"]
|
||||
layout_mode = 2
|
||||
text = "Quit"
|
||||
|
||||
[node name="RightBox" type="VBoxContainer" parent="Multiplayer/MarginContainer/TabContainer/Join/MarginContainer/HBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
|
||||
[node name="JoinAddress" type="LineEdit" parent="Multiplayer/MarginContainer/TabContainer/Join/MarginContainer/HBoxContainer/RightBox"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
placeholder_text = "localhost"
|
||||
|
||||
[node name="Host" type="TabBar" parent="Multiplayer/MarginContainer/TabContainer"]
|
||||
visible = false
|
||||
layout_mode = 2
|
||||
select_with_rmb = true
|
||||
|
||||
[node name="MarginContainer" type="MarginContainer" parent="Multiplayer/MarginContainer/TabContainer/Host"]
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
theme_override_constants/margin_left = 20
|
||||
theme_override_constants/margin_top = 20
|
||||
theme_override_constants/margin_right = 20
|
||||
theme_override_constants/margin_bottom = 20
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="Multiplayer/MarginContainer/TabContainer/Host/MarginContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 10
|
||||
|
||||
[node name="LeftBox" type="VBoxContainer" parent="Multiplayer/MarginContainer/TabContainer/Host/MarginContainer/HBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_stretch_ratio = 0.25
|
||||
|
||||
[node name="Host" type="Button" parent="Multiplayer/MarginContainer/TabContainer/Host/MarginContainer/HBoxContainer/LeftBox"]
|
||||
layout_mode = 2
|
||||
text = "Host"
|
||||
|
||||
[node name="Spacer" type="MarginContainer" parent="Multiplayer/MarginContainer/TabContainer/Host/MarginContainer/HBoxContainer/LeftBox"]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 3
|
||||
|
||||
[node name="Menu" type="Button" parent="Multiplayer/MarginContainer/TabContainer/Host/MarginContainer/HBoxContainer/LeftBox"]
|
||||
layout_mode = 2
|
||||
text = "Menu
|
||||
"
|
||||
|
||||
[node name="Quit" type="Button" parent="Multiplayer/MarginContainer/TabContainer/Host/MarginContainer/HBoxContainer/LeftBox"]
|
||||
layout_mode = 2
|
||||
text = "Quit"
|
||||
|
||||
[node name="RightBox" type="VBoxContainer" parent="Multiplayer/MarginContainer/TabContainer/Host/MarginContainer/HBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
|
||||
[node name="ServerPort" type="LineEdit" parent="Multiplayer/MarginContainer/TabContainer/Host/MarginContainer/HBoxContainer/RightBox"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
placeholder_text = "9000"
|
||||
|
||||
[node name="Modal" type="Panel" parent="Multiplayer"]
|
||||
visible = false
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Label" type="Label" parent="Multiplayer/Modal"]
|
||||
layout_mode = 1
|
||||
anchors_preset = 8
|
||||
anchor_left = 0.5
|
||||
anchor_top = 0.5
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 0.5
|
||||
offset_left = -59.5
|
||||
offset_top = -11.5
|
||||
offset_right = 59.5
|
||||
offset_bottom = 11.5
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
text = "CONNECTING..."
|
||||
|
||||
[node name="Main" type="PanelContainer" parent="."]
|
||||
anchors_preset = 9
|
||||
|
|
@ -93,6 +340,17 @@ layout_mode = 2
|
|||
theme_override_font_sizes/font_size = 32
|
||||
text = "Quit"
|
||||
|
||||
[connection signal="join_server" from="Multiplayer" to="." method="_on_multiplayer_join_server"]
|
||||
[connection signal="start_server" from="Multiplayer" to="." method="_on_multiplayer_start_server"]
|
||||
[connection signal="pressed" from="Multiplayer/MarginContainer/TabContainer/Profile/MarginContainer/HBoxContainer/LeftBox/Menu" to="Multiplayer" method="_on_menu_pressed"]
|
||||
[connection signal="pressed" from="Multiplayer/MarginContainer/TabContainer/Profile/MarginContainer/HBoxContainer/LeftBox/Quit" to="Multiplayer" method="_on_quit_pressed"]
|
||||
[connection signal="pressed" from="Multiplayer/MarginContainer/TabContainer/Join/MarginContainer/HBoxContainer/LeftBox/Join" to="Multiplayer" method="_on_join_pressed"]
|
||||
[connection signal="pressed" from="Multiplayer/MarginContainer/TabContainer/Join/MarginContainer/HBoxContainer/LeftBox/Menu" to="Multiplayer" method="_on_menu_pressed"]
|
||||
[connection signal="pressed" from="Multiplayer/MarginContainer/TabContainer/Join/MarginContainer/HBoxContainer/LeftBox/Quit" to="Multiplayer" method="_on_quit_pressed"]
|
||||
[connection signal="pressed" from="Multiplayer/MarginContainer/TabContainer/Host/MarginContainer/HBoxContainer/LeftBox/Host" to="Multiplayer" method="_on_host_pressed"]
|
||||
[connection signal="pressed" from="Multiplayer/MarginContainer/TabContainer/Host/MarginContainer/HBoxContainer/LeftBox/Menu" to="Multiplayer" method="_on_menu_pressed"]
|
||||
[connection signal="pressed" from="Multiplayer/MarginContainer/TabContainer/Host/MarginContainer/HBoxContainer/LeftBox/Quit" to="Multiplayer" method="_on_quit_pressed"]
|
||||
[connection signal="text_changed" from="Multiplayer/MarginContainer/TabContainer/Host/MarginContainer/HBoxContainer/RightBox/ServerPort" to="Multiplayer/MarginContainer/TabContainer/Host/MarginContainer/HBoxContainer/RightBox/ServerPort" method="_on_text_changed"]
|
||||
[connection signal="pressed" from="Main/MarginContainer/VBoxContainer/Demo" to="." method="_on_demo_pressed"]
|
||||
[connection signal="pressed" from="Main/MarginContainer/VBoxContainer/Multiplayer" to="Main" method="_on_multiplayer_pressed"]
|
||||
[connection signal="pressed" from="Main/MarginContainer/VBoxContainer/Quit" to="Main" method="_on_quit_pressed"]
|
||||
|
|
|
|||
|
|
@ -1,285 +0,0 @@
|
|||
[gd_scene load_steps=3 format=3 uid="uid://1seg8cvss7a7"]
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_krqeq"]
|
||||
bg_color = Color(0.5, 0.5, 0.5, 0.25)
|
||||
|
||||
[sub_resource type="GDScript" id="GDScript_tc1bm"]
|
||||
script/source = "extends PanelContainer
|
||||
|
||||
const MAX_CLIENTS : int = 20
|
||||
const DEFAULT_PORT : int = 9000
|
||||
const DEFAULT_HOST : String = \"localhost\"
|
||||
|
||||
var _join_address = RegEx.new()
|
||||
var _registered_ports = RegEx.new()
|
||||
|
||||
signal start_server(peer)
|
||||
signal join_server(peer)
|
||||
|
||||
func _ready():
|
||||
# see https://datatracker.ietf.org/doc/html/rfc1700
|
||||
_registered_ports.compile(r'^(?:102[4-9]|10[3-9]\\d|1[1-9]\\d{2}|[2-9]\\d{3}|[1-5]\\d{4}|6[0-4]\\d{3}|65[0-4]\\d{2}|655[0-2]\\d|6553[0-5])$')
|
||||
_join_address.compile(r'^(?<host>[a-zA-Z0-9.-]+)(:(?<port>:102[4-9]|10[3-9]\\d|1[1-9]\\d{2}|[2-9]\\d{3}|[1-5]\\d{4}|6[0-4]\\d{3}|65[0-4]\\d{2}|655[0-2]\\d|6553[0-5]))?$')
|
||||
hide() # start hidden
|
||||
|
||||
func _on_menu_pressed():
|
||||
hide()
|
||||
owner.get_node(\"Main\").show()
|
||||
|
||||
func _on_quit_pressed():
|
||||
get_tree().quit()
|
||||
|
||||
func _on_join_pressed():
|
||||
var addr = [DEFAULT_HOST, DEFAULT_PORT]
|
||||
# validate join address input
|
||||
var result = _join_address.search(%JoinAddress.text)
|
||||
if result: # address is valid
|
||||
addr[0] = result.get_string(\"host\")
|
||||
var rport = result.get_string(\"port\")
|
||||
if rport: addr[1] = int(rport)
|
||||
|
||||
# create client
|
||||
var peer = ENetMultiplayerPeer.new()
|
||||
peer.create_client(addr[0], addr[1])
|
||||
|
||||
multiplayer.connected_to_server.connect(_on_client_connected.bind(peer))
|
||||
multiplayer.connection_failed.connect(_on_client_connection_failed)
|
||||
$Modal.show()
|
||||
multiplayer.multiplayer_peer = peer
|
||||
|
||||
func _on_host_pressed():
|
||||
var port = DEFAULT_PORT
|
||||
|
||||
# check for registered ports number matches
|
||||
if %ServerPort.text:
|
||||
var result = _registered_ports.search(%ServerPort.text)
|
||||
if result: # port is valid
|
||||
port = int(result.get_string())
|
||||
else: # port is not valid
|
||||
push_warning(\"A valid port number in the range 1024-65535 is required.\")
|
||||
return
|
||||
|
||||
## create server
|
||||
var peer = ENetMultiplayerPeer.new()
|
||||
peer.create_server(port, MAX_CLIENTS)
|
||||
|
||||
start_server.emit(peer)
|
||||
|
||||
func _on_client_connected(peer):
|
||||
join_server.emit(peer)
|
||||
|
||||
func _on_client_connection_failed():
|
||||
$Modal.hide()
|
||||
"
|
||||
|
||||
[node name="Multiplayer" type="PanelContainer"]
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
theme_override_styles/panel = SubResource("StyleBoxFlat_krqeq")
|
||||
script = SubResource("GDScript_tc1bm")
|
||||
|
||||
[node name="MarginContainer" type="MarginContainer" parent="."]
|
||||
layout_mode = 2
|
||||
theme_override_constants/margin_left = 20
|
||||
theme_override_constants/margin_top = 20
|
||||
theme_override_constants/margin_right = 20
|
||||
theme_override_constants/margin_bottom = 20
|
||||
|
||||
[node name="TabContainer" type="TabContainer" parent="MarginContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/side_margin = 0
|
||||
|
||||
[node name="Profile" type="TabBar" parent="MarginContainer/TabContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/h_separation = 0
|
||||
|
||||
[node name="MarginContainer" type="MarginContainer" parent="MarginContainer/TabContainer/Profile"]
|
||||
layout_mode = 0
|
||||
offset_right = 1116.0
|
||||
offset_bottom = 577.0
|
||||
theme_override_constants/margin_left = 20
|
||||
theme_override_constants/margin_top = 20
|
||||
theme_override_constants/margin_right = 20
|
||||
theme_override_constants/margin_bottom = 20
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="MarginContainer/TabContainer/Profile/MarginContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 20
|
||||
|
||||
[node name="LeftBox" type="VBoxContainer" parent="MarginContainer/TabContainer/Profile/MarginContainer/HBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_stretch_ratio = 0.25
|
||||
|
||||
[node name="Create" type="Button" parent="MarginContainer/TabContainer/Profile/MarginContainer/HBoxContainer/LeftBox"]
|
||||
layout_mode = 2
|
||||
disabled = true
|
||||
text = "Create"
|
||||
|
||||
[node name="Delete" type="Button" parent="MarginContainer/TabContainer/Profile/MarginContainer/HBoxContainer/LeftBox"]
|
||||
layout_mode = 2
|
||||
disabled = true
|
||||
text = "Delete"
|
||||
|
||||
[node name="Spacer" type="MarginContainer" parent="MarginContainer/TabContainer/Profile/MarginContainer/HBoxContainer/LeftBox"]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 3
|
||||
|
||||
[node name="Menu" type="Button" parent="MarginContainer/TabContainer/Profile/MarginContainer/HBoxContainer/LeftBox"]
|
||||
layout_mode = 2
|
||||
text = "Menu
|
||||
"
|
||||
|
||||
[node name="Quit" type="Button" parent="MarginContainer/TabContainer/Profile/MarginContainer/HBoxContainer/LeftBox"]
|
||||
layout_mode = 2
|
||||
text = "Quit"
|
||||
|
||||
[node name="RightBox" type="VBoxContainer" parent="MarginContainer/TabContainer/Profile/MarginContainer/HBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
|
||||
[node name="Label" type="Label" parent="MarginContainer/TabContainer/Profile/MarginContainer/HBoxContainer/RightBox"]
|
||||
layout_mode = 2
|
||||
text = "Current Profile:"
|
||||
|
||||
[node name="ProfileName" type="LineEdit" parent="MarginContainer/TabContainer/Profile/MarginContainer/HBoxContainer/RightBox"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
text = "Newblood"
|
||||
|
||||
[node name="Join" type="TabBar" parent="MarginContainer/TabContainer"]
|
||||
visible = false
|
||||
layout_mode = 2
|
||||
select_with_rmb = true
|
||||
|
||||
[node name="MarginContainer" type="MarginContainer" parent="MarginContainer/TabContainer/Join"]
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
theme_override_constants/margin_left = 20
|
||||
theme_override_constants/margin_top = 20
|
||||
theme_override_constants/margin_right = 20
|
||||
theme_override_constants/margin_bottom = 20
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="MarginContainer/TabContainer/Join/MarginContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 10
|
||||
|
||||
[node name="LeftBox" type="VBoxContainer" parent="MarginContainer/TabContainer/Join/MarginContainer/HBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_stretch_ratio = 0.25
|
||||
|
||||
[node name="Join" type="Button" parent="MarginContainer/TabContainer/Join/MarginContainer/HBoxContainer/LeftBox"]
|
||||
layout_mode = 2
|
||||
text = "Join"
|
||||
|
||||
[node name="Spacer" type="MarginContainer" parent="MarginContainer/TabContainer/Join/MarginContainer/HBoxContainer/LeftBox"]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 3
|
||||
|
||||
[node name="Menu" type="Button" parent="MarginContainer/TabContainer/Join/MarginContainer/HBoxContainer/LeftBox"]
|
||||
layout_mode = 2
|
||||
text = "Menu
|
||||
"
|
||||
|
||||
[node name="Quit" type="Button" parent="MarginContainer/TabContainer/Join/MarginContainer/HBoxContainer/LeftBox"]
|
||||
layout_mode = 2
|
||||
text = "Quit"
|
||||
|
||||
[node name="RightBox" type="VBoxContainer" parent="MarginContainer/TabContainer/Join/MarginContainer/HBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
|
||||
[node name="JoinAddress" type="LineEdit" parent="MarginContainer/TabContainer/Join/MarginContainer/HBoxContainer/RightBox"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
placeholder_text = "localhost"
|
||||
|
||||
[node name="Host" type="TabBar" parent="MarginContainer/TabContainer"]
|
||||
visible = false
|
||||
layout_mode = 2
|
||||
select_with_rmb = true
|
||||
|
||||
[node name="MarginContainer" type="MarginContainer" parent="MarginContainer/TabContainer/Host"]
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
theme_override_constants/margin_left = 20
|
||||
theme_override_constants/margin_top = 20
|
||||
theme_override_constants/margin_right = 20
|
||||
theme_override_constants/margin_bottom = 20
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="MarginContainer/TabContainer/Host/MarginContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 10
|
||||
|
||||
[node name="LeftBox" type="VBoxContainer" parent="MarginContainer/TabContainer/Host/MarginContainer/HBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_stretch_ratio = 0.25
|
||||
|
||||
[node name="Host" type="Button" parent="MarginContainer/TabContainer/Host/MarginContainer/HBoxContainer/LeftBox"]
|
||||
layout_mode = 2
|
||||
text = "Host"
|
||||
|
||||
[node name="Spacer" type="MarginContainer" parent="MarginContainer/TabContainer/Host/MarginContainer/HBoxContainer/LeftBox"]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 3
|
||||
|
||||
[node name="Menu" type="Button" parent="MarginContainer/TabContainer/Host/MarginContainer/HBoxContainer/LeftBox"]
|
||||
layout_mode = 2
|
||||
text = "Menu
|
||||
"
|
||||
|
||||
[node name="Quit" type="Button" parent="MarginContainer/TabContainer/Host/MarginContainer/HBoxContainer/LeftBox"]
|
||||
layout_mode = 2
|
||||
text = "Quit"
|
||||
|
||||
[node name="RightBox" type="VBoxContainer" parent="MarginContainer/TabContainer/Host/MarginContainer/HBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
|
||||
[node name="ServerPort" type="LineEdit" parent="MarginContainer/TabContainer/Host/MarginContainer/HBoxContainer/RightBox"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
placeholder_text = "9000"
|
||||
|
||||
[node name="Modal" type="Panel" parent="."]
|
||||
visible = false
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Label" type="Label" parent="Modal"]
|
||||
layout_mode = 1
|
||||
anchors_preset = 8
|
||||
anchor_left = 0.5
|
||||
anchor_top = 0.5
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 0.5
|
||||
offset_left = -59.5
|
||||
offset_top = -11.5
|
||||
offset_right = 59.5
|
||||
offset_bottom = 11.5
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
text = "CONNECTING..."
|
||||
|
||||
[connection signal="pressed" from="MarginContainer/TabContainer/Profile/MarginContainer/HBoxContainer/LeftBox/Menu" to="." method="_on_menu_pressed"]
|
||||
[connection signal="pressed" from="MarginContainer/TabContainer/Profile/MarginContainer/HBoxContainer/LeftBox/Quit" to="." method="_on_quit_pressed"]
|
||||
[connection signal="pressed" from="MarginContainer/TabContainer/Join/MarginContainer/HBoxContainer/LeftBox/Join" to="." method="_on_join_pressed"]
|
||||
[connection signal="pressed" from="MarginContainer/TabContainer/Join/MarginContainer/HBoxContainer/LeftBox/Menu" to="." method="_on_menu_pressed"]
|
||||
[connection signal="pressed" from="MarginContainer/TabContainer/Join/MarginContainer/HBoxContainer/LeftBox/Quit" to="." method="_on_quit_pressed"]
|
||||
[connection signal="pressed" from="MarginContainer/TabContainer/Host/MarginContainer/HBoxContainer/LeftBox/Host" to="." method="_on_host_pressed"]
|
||||
[connection signal="pressed" from="MarginContainer/TabContainer/Host/MarginContainer/HBoxContainer/LeftBox/Menu" to="." method="_on_menu_pressed"]
|
||||
[connection signal="pressed" from="MarginContainer/TabContainer/Host/MarginContainer/HBoxContainer/LeftBox/Quit" to="." method="_on_quit_pressed"]
|
||||
[connection signal="text_changed" from="MarginContainer/TabContainer/Host/MarginContainer/HBoxContainer/RightBox/ServerPort" to="MarginContainer/TabContainer/Host/MarginContainer/HBoxContainer/RightBox/ServerPort" method="_on_text_changed"]
|
||||
Loading…
Add table
Add a link
Reference in a new issue