Align patterns better around what UI components are. Move script related controllers to scripts folder

This commit is contained in:
2026-08-15 14:33:06 -05:00
parent 3fcabe1a53
commit 4d54f8de37
14 changed files with 20 additions and 19 deletions

View File

@@ -1,7 +1,7 @@
[gd_scene load_steps=3 format=3 uid="uid://b0cqo3qo62y6n"] [gd_scene load_steps=3 format=3 uid="uid://b0cqo3qo62y6n"]
[ext_resource type="Script" uid="uid://chu1htrspx5su" path="res://lobby.gd" id="1_ob30c"] [ext_resource type="Script" uid="uid://chu1htrspx5su" path="res://lobby.gd" id="1_ob30c"]
[ext_resource type="PackedScene" uid="uid://dy51wny4x53f4" path="res://scenes/data/data_bridge.tscn" id="2_h8t3n"] [ext_resource type="PackedScene" uid="uid://dy51wny4x53f4" path="res://scripts/data/data_bridge.tscn" id="2_h8t3n"]
[node name="lobby" type="Node"] [node name="lobby" type="Node"]
editor_description = "Note: The root node needs to match game's client root node in order for proper sync talk." editor_description = "Note: The root node needs to match game's client root node in order for proper sync talk."

View File

@@ -1,13 +1,13 @@
[gd_scene load_steps=4 format=3 uid="uid://dkes5cdu45q6e"] [gd_scene load_steps=4 format=3 uid="uid://dkes5cdu45q6e"]
[ext_resource type="Script" uid="uid://dk7afnf7ol7dy" path="res://scenes/screens/lobby_screen/lobby.gd" id="1_hhiik"] [ext_resource type="Script" uid="uid://dk7afnf7ol7dy" path="res://scenes/screens/lobby_screen/lobby.gd" id="1_hhiik"]
[ext_resource type="PackedScene" uid="uid://rb6av5eg4u0" path="res://scenes/ui_controls/lobby/ui.tscn" id="2_lqt48"] [ext_resource type="PackedScene" uid="uid://rb6av5eg4u0" path="res://scenes/ui/lobby/lobby_ui.tscn" id="2_lqt48"]
[ext_resource type="Script" uid="uid://crbm3v4td6du6" path="res://scenes/screens/lobby_screen/lobby_server.gd" id="4_glu7g"] [ext_resource type="Script" uid="uid://crbm3v4td6du6" path="res://scenes/screens/lobby_screen/lobby_server.gd" id="4_glu7g"]
[node name="lobby" type="Node"] [node name="lobby" type="Node"]
script = ExtResource("1_hhiik") script = ExtResource("1_hhiik")
[node name="ui" parent="." instance=ExtResource("2_lqt48")] [node name="lobby_ui" parent="." instance=ExtResource("2_lqt48")]
theme_override_constants/margin_left = 10 theme_override_constants/margin_left = 10
theme_override_constants/margin_top = 10 theme_override_constants/margin_top = 10
theme_override_constants/margin_right = 10 theme_override_constants/margin_right = 10
@@ -16,8 +16,8 @@ theme_override_constants/margin_bottom = 10
[node name="server" type="Node" parent="."] [node name="server" type="Node" parent="."]
script = ExtResource("4_glu7g") script = ExtResource("4_glu7g")
[connection signal="pressed" from="ui/body/left_body/server_host_hbox/host_start_bttn" to="." method="_on_host_start_bttn_pressed"] [connection signal="pressed" from="lobby_ui/body/left_body/server_host_hbox/host_start_bttn" to="." method="_on_host_start_bttn_pressed"]
[connection signal="pressed" from="ui/body/left_body/server_host_hbox/host_stop_bttn" to="." method="_on_host_stop_bttn_pressed"] [connection signal="pressed" from="lobby_ui/body/left_body/server_host_hbox/host_stop_bttn" to="." method="_on_host_stop_bttn_pressed"]
[connection signal="pressed" from="ui/body/left_body/search_vbox/search_hbox/match_search_bttn" to="." method="_on_match_search_bttn_pressed"] [connection signal="pressed" from="lobby_ui/body/left_body/search_vbox/search_hbox/match_search_bttn" to="." method="_on_match_search_bttn_pressed"]
[editable path="ui"] [editable path="lobby_ui"]

View File

@@ -3,14 +3,14 @@ class_name LobbyBase extends Node
const MATCH_ENTRY = preload("res://scenes/screens/lobby_screen/match_entry.tscn") const MATCH_ENTRY = preload("res://scenes/screens/lobby_screen/match_entry.tscn")
@onready var host_start_bttn: Button = $ui/body/left_body/server_host_hbox/host_start_bttn @onready var host_start_bttn: Button = $lobby_ui/body/left_body/server_host_hbox/host_start_bttn
@onready var host_stop_bttn: Button = $ui/body/left_body/server_host_hbox/host_stop_bttn @onready var host_stop_bttn: Button = $lobby_ui/body/left_body/server_host_hbox/host_stop_bttn
@onready var host_address_input: LineEdit = $ui/body/left_body/server_host_hbox/host_address_input @onready var host_address_input: LineEdit = $lobby_ui/body/left_body/server_host_hbox/host_address_input
@onready var host_port_range: SpinBox = $ui/body/left_body/server_host_hbox/host_port_range @onready var host_port_range: SpinBox = $lobby_ui/body/left_body/server_host_hbox/host_port_range
@onready var search_vbox: VBoxContainer = $ui/body/left_body/search_vbox @onready var search_vbox: VBoxContainer = $lobby_ui/body/left_body/search_vbox
@onready var match_search_input: LineEdit = $ui/body/left_body/search_vbox/search_hbox/match_search_input @onready var match_search_input: LineEdit = $lobby_ui/body/left_body/search_vbox/search_hbox/match_search_input
@onready var match_list: VBoxContainer = $ui/body/left_body/search_vbox/scroll_container/match_list @onready var match_list: VBoxContainer = $lobby_ui/body/left_body/search_vbox/scroll_container/match_list
@onready var server: Node = $server @onready var server: Node = $server

View File

@@ -22,7 +22,7 @@ corner_radius_top_right = 3
corner_radius_bottom_right = 3 corner_radius_bottom_right = 3
corner_radius_bottom_left = 3 corner_radius_bottom_left = 3
[node name="margin" type="MarginContainer"] [node name="lobby_ui" type="MarginContainer"]
anchors_preset = 15 anchors_preset = 15
anchor_right = 1.0 anchor_right = 1.0
anchor_bottom = 1.0 anchor_bottom = 1.0

View File

@@ -1,9 +1,9 @@
[gd_scene load_steps=5 format=3 uid="uid://dy51wny4x53f4"] [gd_scene load_steps=5 format=3 uid="uid://dy51wny4x53f4"]
[ext_resource type="Script" uid="uid://dbnl4tjahkoun" path="res://scenes/data/game_data.gd" id="1_l6w8l"] [ext_resource type="Script" uid="uid://dbnl4tjahkoun" path="res://scripts/data/game_data.gd" id="1_l6w8l"]
[ext_resource type="Script" uid="uid://65x4bq2wsh8k" path="res://scenes/data/game_state.gd" id="2_6ash1"] [ext_resource type="Script" uid="uid://65x4bq2wsh8k" path="res://scripts/data/game_state.gd" id="2_6ash1"]
[ext_resource type="Script" uid="uid://dyq4p5e06ib14" path="res://scenes/data/lobby_data.gd" id="3_l6w8l"] [ext_resource type="Script" uid="uid://dyq4p5e06ib14" path="res://scripts/data/lobby_data.gd" id="3_l6w8l"]
[ext_resource type="Script" uid="uid://uyimqfjmuc34" path="res://scenes/data/multiplayer_data.gd" id="4_gcm58"] [ext_resource type="Script" uid="uid://uyimqfjmuc34" path="res://scripts/data/multiplayer_data.gd" id="4_gcm58"]
[node name="data_bridge" type="Node"] [node name="data_bridge" type="Node"]

View File

@@ -35,6 +35,7 @@ func start_server(address: String = "0.0.0.0", port: int = 8080) -> void:
func close_connection() -> void: func close_connection() -> void:
if not peer: return if not peer: return
if not multiplayer: return
push_warning("Server Closed...") push_warning("Server Closed...")