feat: Add initial player scene with character models and effects, implement core lobby UI and functionality, and introduce a 3D outline shader.

This commit is contained in:
Yogi Wiguna
2026-03-26 12:12:08 +08:00
parent 7b1f884e84
commit ebc1c9868a
4 changed files with 64 additions and 0 deletions
+22
View File
@@ -145,6 +145,10 @@ func _ready():
refresh_btn.pressed.connect(_on_refresh_pressed)
join_btn.pressed.connect(_on_join_pressed)
back_btn.pressed.connect(_on_back_pressed)
if room_list:
room_list.item_selected.connect(_on_room_selected)
room_list.item_activated.connect(_on_room_activated)
if room_list_profile_btn:
room_list_profile_btn.pressed.connect(_on_profile_btn_pressed)
@@ -361,6 +365,24 @@ func _on_refresh_pressed() -> void:
room_list.clear()
LobbyManager.refresh_room_list()
func _on_room_selected(index: int) -> void:
"""Automatically fill the match_id input when a room is clicked so it's not lost on focus change."""
if index < LobbyManager.available_rooms.size():
var room = LobbyManager.available_rooms[index]
if LobbyManager.is_lan_mode:
var ip = room.get("ip", "")
if not ip.is_empty():
match_id_input.text = ip
else:
var mid = room.get("match_id", "")
if not mid.is_empty():
match_id_input.text = mid
func _on_room_activated(index: int) -> void:
"""Handle double-clicking a room to join immediately."""
_on_room_selected(index)
_on_join_pressed()
func _on_join_pressed() -> void:
var match_id = match_id_input.text.strip_edges()