Server: - PlayerStateDto: add SeatIndex, TeamIndex, IsEliminated - GameStateDto: add SeatOrder, GameMode - CreateCustomLobbyResponse / JoinCustomLobbyResponse: add MaxPlayers, GameMode, TeamCount - GameEngine.ToDto(): populate new fields from GameState / PlayerState - Handlers: return MaxPlayers, GameMode, TeamCount in lobby create/join ACKs Client: - GameScreen.tscn: add TurnOrderStrip HBoxContainer in TopBar - game_screen.gd: show TurnOrderStrip for >2 player games; _rebuild_turn_order_strip() builds per-player chips sorted by seatIndex, highlighting active/eliminated players - LobbyRoomScreen.tscn: add GameModeLabel, AdditionalPlayersContainer, unique_name on FirstTurnSection/FirstTurnBtns - lobby_room_screen.gd: show game mode + player count; _rebuild_additional_players_panel() shows occupied seats and empty waiting slots; hide first-turn buttons for 3+ players; _on_guest_joined refreshes full display instead of only updating GuestNameLabel Generated with [Claude Code](https://claude.ai/code) via [Happy](https://happy.engineering) Co-Authored-By: Claude <noreply@anthropic.com> Co-Authored-By: Happy <yesreply@happy.engineering>
356 lines
12 KiB
Plaintext
356 lines
12 KiB
Plaintext
[gd_scene load_steps=2 format=3 uid="uid://7gy02ovp5l0v"]
|
|
|
|
[ext_resource type="Script" uid="uid://ba1ux64fml50t" path="res://scenes/free_play/lobby_room_screen.gd" id="1_lrs"]
|
|
|
|
[node name="LobbyRoomScreen" type="Control"]
|
|
layout_mode = 3
|
|
anchors_preset = 15
|
|
anchor_right = 1.0
|
|
anchor_bottom = 1.0
|
|
grow_horizontal = 2
|
|
grow_vertical = 2
|
|
script = ExtResource("1_lrs")
|
|
|
|
[node name="Background" type="ColorRect" parent="."]
|
|
layout_mode = 1
|
|
anchors_preset = 15
|
|
anchor_right = 1.0
|
|
anchor_bottom = 1.0
|
|
grow_horizontal = 2
|
|
grow_vertical = 2
|
|
color = Color(0.094, 0.094, 0.137, 1)
|
|
|
|
[node name="Layout" type="VBoxContainer" parent="."]
|
|
layout_mode = 1
|
|
anchors_preset = 15
|
|
anchor_right = 1.0
|
|
anchor_bottom = 1.0
|
|
grow_horizontal = 2
|
|
grow_vertical = 2
|
|
theme_override_constants/separation = 0
|
|
|
|
[node name="Header" type="HBoxContainer" parent="Layout"]
|
|
custom_minimum_size = Vector2(0, 56)
|
|
layout_mode = 2
|
|
|
|
[node name="HeaderMargin" type="MarginContainer" parent="Layout/Header"]
|
|
layout_mode = 2
|
|
size_flags_horizontal = 3
|
|
theme_override_constants/margin_left = 16
|
|
theme_override_constants/margin_right = 16
|
|
|
|
[node name="HeaderInner" type="HBoxContainer" parent="Layout/Header/HeaderMargin"]
|
|
layout_mode = 2
|
|
size_flags_horizontal = 3
|
|
|
|
[node name="LobbyTitleLabel" type="Label" parent="Layout/Header/HeaderMargin/HeaderInner"]
|
|
unique_name_in_owner = true
|
|
layout_mode = 2
|
|
size_flags_horizontal = 3
|
|
theme_override_font_sizes/font_size = 20
|
|
text = "LOBBY"
|
|
|
|
[node name="LeaveBtn" type="Button" parent="Layout/Header/HeaderMargin/HeaderInner"]
|
|
layout_mode = 2
|
|
theme_override_font_sizes/font_size = 14
|
|
text = "Leave"
|
|
|
|
[node name="Separator" type="HSeparator" parent="Layout"]
|
|
layout_mode = 2
|
|
|
|
[node name="VoteBanner" type="PanelContainer" parent="Layout"]
|
|
unique_name_in_owner = true
|
|
visible = false
|
|
layout_mode = 2
|
|
|
|
[node name="VoteInner" type="HBoxContainer" parent="Layout/VoteBanner"]
|
|
layout_mode = 2
|
|
theme_override_constants/separation = 12
|
|
|
|
[node name="VoteLabel" type="Label" parent="Layout/VoteBanner/VoteInner"]
|
|
unique_name_in_owner = true
|
|
layout_mode = 2
|
|
size_flags_horizontal = 3
|
|
text = "Accept preset?"
|
|
|
|
[node name="VoteYesBtn" type="Button" parent="Layout/VoteBanner/VoteInner"]
|
|
unique_name_in_owner = true
|
|
layout_mode = 2
|
|
text = "Yes"
|
|
|
|
[node name="VoteNoBtn" type="Button" parent="Layout/VoteBanner/VoteInner"]
|
|
unique_name_in_owner = true
|
|
layout_mode = 2
|
|
text = "No"
|
|
|
|
[node name="SuggestionBanner" type="PanelContainer" parent="Layout"]
|
|
unique_name_in_owner = true
|
|
visible = false
|
|
layout_mode = 2
|
|
|
|
[node name="SuggestionInner" type="VBoxContainer" parent="Layout/SuggestionBanner"]
|
|
layout_mode = 2
|
|
theme_override_constants/separation = 6
|
|
|
|
[node name="SuggestionLabel" type="Label" parent="Layout/SuggestionBanner/SuggestionInner"]
|
|
unique_name_in_owner = true
|
|
layout_mode = 2
|
|
size_flags_horizontal = 3
|
|
text = "Guest suggested rule changes:"
|
|
|
|
[node name="SuggestionRulesLabel" type="Label" parent="Layout/SuggestionBanner/SuggestionInner"]
|
|
unique_name_in_owner = true
|
|
modulate = Color(0.85, 0.85, 0.85, 1)
|
|
layout_mode = 2
|
|
size_flags_horizontal = 3
|
|
autowrap_mode = 3
|
|
|
|
[node name="SuggestionBtns" type="HBoxContainer" parent="Layout/SuggestionBanner/SuggestionInner"]
|
|
layout_mode = 2
|
|
theme_override_constants/separation = 8
|
|
|
|
[node name="SuggestionAcceptBtn" type="Button" parent="Layout/SuggestionBanner/SuggestionInner/SuggestionBtns"]
|
|
unique_name_in_owner = true
|
|
layout_mode = 2
|
|
text = "Accept"
|
|
|
|
[node name="SuggestionRejectBtn" type="Button" parent="Layout/SuggestionBanner/SuggestionInner/SuggestionBtns"]
|
|
unique_name_in_owner = true
|
|
layout_mode = 2
|
|
text = "Reject"
|
|
|
|
[node name="MainSplit" type="HSplitContainer" parent="Layout"]
|
|
layout_mode = 2
|
|
size_flags_vertical = 3
|
|
split_offset = 400
|
|
|
|
[node name="LeftPanel" type="ScrollContainer" parent="Layout/MainSplit"]
|
|
layout_mode = 2
|
|
|
|
[node name="LeftContent" type="VBoxContainer" parent="Layout/MainSplit/LeftPanel"]
|
|
layout_mode = 2
|
|
size_flags_horizontal = 3
|
|
theme_override_constants/separation = 12
|
|
|
|
[node name="LeftMargin" type="MarginContainer" parent="Layout/MainSplit/LeftPanel/LeftContent"]
|
|
layout_mode = 2
|
|
theme_override_constants/margin_left = 16
|
|
theme_override_constants/margin_top = 16
|
|
theme_override_constants/margin_right = 16
|
|
theme_override_constants/margin_bottom = 16
|
|
|
|
[node name="LeftInner" type="VBoxContainer" parent="Layout/MainSplit/LeftPanel/LeftContent/LeftMargin"]
|
|
layout_mode = 2
|
|
theme_override_constants/separation = 14
|
|
|
|
[node name="GameModeLabel" type="Label" parent="Layout/MainSplit/LeftPanel/LeftContent/LeftMargin/LeftInner"]
|
|
unique_name_in_owner = true
|
|
modulate = Color(0.7, 0.85, 1.0, 1)
|
|
layout_mode = 2
|
|
theme_override_font_sizes/font_size = 12
|
|
text = "Mode: FFA"
|
|
|
|
[node name="HostSection" type="Label" parent="Layout/MainSplit/LeftPanel/LeftContent/LeftMargin/LeftInner"]
|
|
modulate = Color(0.6, 0.6, 0.65, 1)
|
|
layout_mode = 2
|
|
theme_override_font_sizes/font_size = 11
|
|
text = "HOST"
|
|
|
|
[node name="HostNameLabel" type="Label" parent="Layout/MainSplit/LeftPanel/LeftContent/LeftMargin/LeftInner"]
|
|
unique_name_in_owner = true
|
|
layout_mode = 2
|
|
theme_override_font_sizes/font_size = 15
|
|
text = "Host: …"
|
|
|
|
[node name="HostDeckLabel" type="Label" parent="Layout/MainSplit/LeftPanel/LeftContent/LeftMargin/LeftInner"]
|
|
unique_name_in_owner = true
|
|
modulate = Color(0.75, 0.75, 0.75, 1)
|
|
layout_mode = 2
|
|
text = "Deck: (none)"
|
|
|
|
[node name="HostReadyIndicator" type="Label" parent="Layout/MainSplit/LeftPanel/LeftContent/LeftMargin/LeftInner"]
|
|
unique_name_in_owner = true
|
|
modulate = Color(0.6, 0.6, 0.6, 1)
|
|
layout_mode = 2
|
|
text = "Not ready"
|
|
|
|
[node name="GuestSep" type="HSeparator" parent="Layout/MainSplit/LeftPanel/LeftContent/LeftMargin/LeftInner"]
|
|
layout_mode = 2
|
|
|
|
[node name="GuestSection" type="Label" parent="Layout/MainSplit/LeftPanel/LeftContent/LeftMargin/LeftInner"]
|
|
modulate = Color(0.6, 0.6, 0.65, 1)
|
|
layout_mode = 2
|
|
theme_override_font_sizes/font_size = 11
|
|
text = "GUEST"
|
|
|
|
[node name="GuestNameLabel" type="Label" parent="Layout/MainSplit/LeftPanel/LeftContent/LeftMargin/LeftInner"]
|
|
unique_name_in_owner = true
|
|
layout_mode = 2
|
|
theme_override_font_sizes/font_size = 15
|
|
text = "Waiting for guest…"
|
|
|
|
[node name="GuestDeckLabel" type="Label" parent="Layout/MainSplit/LeftPanel/LeftContent/LeftMargin/LeftInner"]
|
|
unique_name_in_owner = true
|
|
modulate = Color(0.75, 0.75, 0.75, 1)
|
|
layout_mode = 2
|
|
|
|
[node name="GuestReadyIndicator" type="Label" parent="Layout/MainSplit/LeftPanel/LeftContent/LeftMargin/LeftInner"]
|
|
unique_name_in_owner = true
|
|
modulate = Color(0.6, 0.6, 0.6, 1)
|
|
layout_mode = 2
|
|
text = "Not ready"
|
|
|
|
[node name="AdditionalPlayersContainer" type="VBoxContainer" parent="Layout/MainSplit/LeftPanel/LeftContent/LeftMargin/LeftInner"]
|
|
unique_name_in_owner = true
|
|
layout_mode = 2
|
|
theme_override_constants/separation = 8
|
|
visible = false
|
|
|
|
[node name="ActionSep" type="HSeparator" parent="Layout/MainSplit/LeftPanel/LeftContent/LeftMargin/LeftInner"]
|
|
layout_mode = 2
|
|
|
|
[node name="ChangeDeckBtn" type="Button" parent="Layout/MainSplit/LeftPanel/LeftContent/LeftMargin/LeftInner"]
|
|
unique_name_in_owner = true
|
|
layout_mode = 2
|
|
text = "Change Deck"
|
|
|
|
[node name="FirstTurnSection" type="Label" parent="Layout/MainSplit/LeftPanel/LeftContent/LeftMargin/LeftInner"]
|
|
unique_name_in_owner = true
|
|
modulate = Color(0.6, 0.6, 0.65, 1)
|
|
layout_mode = 2
|
|
theme_override_font_sizes/font_size = 11
|
|
text = "WHO GOES FIRST?"
|
|
|
|
[node name="FirstTurnBtns" type="HBoxContainer" parent="Layout/MainSplit/LeftPanel/LeftContent/LeftMargin/LeftInner"]
|
|
unique_name_in_owner = true
|
|
layout_mode = 2
|
|
theme_override_constants/separation = 8
|
|
|
|
[node name="FirstMeBtn" type="Button" parent="Layout/MainSplit/LeftPanel/LeftContent/LeftMargin/LeftInner/FirstTurnBtns"]
|
|
unique_name_in_owner = true
|
|
layout_mode = 2
|
|
size_flags_horizontal = 3
|
|
toggle_mode = true
|
|
text = "Me"
|
|
|
|
[node name="FirstOppBtn" type="Button" parent="Layout/MainSplit/LeftPanel/LeftContent/LeftMargin/LeftInner/FirstTurnBtns"]
|
|
unique_name_in_owner = true
|
|
layout_mode = 2
|
|
size_flags_horizontal = 3
|
|
toggle_mode = true
|
|
text = "Opponent"
|
|
|
|
[node name="FirstRandomBtn" type="Button" parent="Layout/MainSplit/LeftPanel/LeftContent/LeftMargin/LeftInner/FirstTurnBtns"]
|
|
unique_name_in_owner = true
|
|
layout_mode = 2
|
|
size_flags_horizontal = 3
|
|
toggle_mode = true
|
|
button_pressed = true
|
|
text = "Random"
|
|
|
|
[node name="ReadyBtn" type="Button" parent="Layout/MainSplit/LeftPanel/LeftContent/LeftMargin/LeftInner"]
|
|
unique_name_in_owner = true
|
|
custom_minimum_size = Vector2(0, 52)
|
|
layout_mode = 2
|
|
theme_override_font_sizes/font_size = 16
|
|
text = "✓ Ready"
|
|
|
|
[node name="RightPanel" type="ScrollContainer" parent="Layout/MainSplit"]
|
|
layout_mode = 2
|
|
|
|
[node name="RightContent" type="VBoxContainer" parent="Layout/MainSplit/RightPanel"]
|
|
layout_mode = 2
|
|
size_flags_horizontal = 3
|
|
|
|
[node name="RightMargin" type="MarginContainer" parent="Layout/MainSplit/RightPanel/RightContent"]
|
|
layout_mode = 2
|
|
theme_override_constants/margin_left = 16
|
|
theme_override_constants/margin_top = 16
|
|
theme_override_constants/margin_right = 16
|
|
theme_override_constants/margin_bottom = 16
|
|
|
|
[node name="RightInner" type="VBoxContainer" parent="Layout/MainSplit/RightPanel/RightContent/RightMargin"]
|
|
layout_mode = 2
|
|
theme_override_constants/separation = 12
|
|
|
|
[node name="RulesTitle" type="Label" parent="Layout/MainSplit/RightPanel/RightContent/RightMargin/RightInner"]
|
|
modulate = Color(0.6, 0.6, 0.65, 1)
|
|
layout_mode = 2
|
|
theme_override_font_sizes/font_size = 11
|
|
text = "RULES"
|
|
|
|
[node name="RulesLabel" type="Label" parent="Layout/MainSplit/RightPanel/RightContent/RightMargin/RightInner"]
|
|
unique_name_in_owner = true
|
|
modulate = Color(0.85, 0.85, 0.85, 1)
|
|
layout_mode = 2
|
|
text = "(default rules)"
|
|
autowrap_mode = 3
|
|
|
|
[node name="EditRulesBtn" type="Button" parent="Layout/MainSplit/RightPanel/RightContent/RightMargin/RightInner"]
|
|
unique_name_in_owner = true
|
|
layout_mode = 2
|
|
text = "Edit / Suggest Rules"
|
|
|
|
[node name="PresetSep" type="HSeparator" parent="Layout/MainSplit/RightPanel/RightContent/RightMargin/RightInner"]
|
|
layout_mode = 2
|
|
|
|
[node name="PresetsTitle" type="Label" parent="Layout/MainSplit/RightPanel/RightContent/RightMargin/RightInner"]
|
|
modulate = Color(0.6, 0.6, 0.65, 1)
|
|
layout_mode = 2
|
|
theme_override_font_sizes/font_size = 11
|
|
text = "PRESETS"
|
|
|
|
[node name="PresetBtns" type="HBoxContainer" parent="Layout/MainSplit/RightPanel/RightContent/RightMargin/RightInner"]
|
|
layout_mode = 2
|
|
theme_override_constants/separation = 8
|
|
|
|
[node name="SavePresetBtn" type="Button" parent="Layout/MainSplit/RightPanel/RightContent/RightMargin/RightInner/PresetBtns"]
|
|
unique_name_in_owner = true
|
|
layout_mode = 2
|
|
text = "Save Preset"
|
|
|
|
[node name="LoadPresetBtn" type="Button" parent="Layout/MainSplit/RightPanel/RightContent/RightMargin/RightInner/PresetBtns"]
|
|
unique_name_in_owner = true
|
|
layout_mode = 2
|
|
text = "Load Preset"
|
|
|
|
[node name="DeckPickerDialog" type="AcceptDialog" parent="."]
|
|
unique_name_in_owner = true
|
|
title = "Choose Deck"
|
|
initial_position = 4
|
|
size = Vector2i(300, 280)
|
|
min_size = Vector2i(300, 280)
|
|
|
|
[node name="DeckPickerScroll" type="ScrollContainer" parent="DeckPickerDialog"]
|
|
anchors_preset = 15
|
|
anchor_right = 1.0
|
|
anchor_bottom = 1.0
|
|
grow_horizontal = 2
|
|
grow_vertical = 2
|
|
|
|
[node name="DeckPickerContainer" type="VBoxContainer" parent="DeckPickerDialog/DeckPickerScroll"]
|
|
unique_name_in_owner = true
|
|
layout_mode = 2
|
|
size_flags_horizontal = 3
|
|
theme_override_constants/separation = 6
|
|
|
|
[node name="PresetListDialog" type="AcceptDialog" parent="."]
|
|
unique_name_in_owner = true
|
|
title = "Load Preset"
|
|
initial_position = 4
|
|
size = Vector2i(300, 280)
|
|
min_size = Vector2i(300, 280)
|
|
|
|
[node name="PresetListScroll" type="ScrollContainer" parent="PresetListDialog"]
|
|
anchors_preset = 15
|
|
anchor_right = 1.0
|
|
anchor_bottom = 1.0
|
|
grow_horizontal = 2
|
|
grow_vertical = 2
|
|
|
|
[node name="PresetListContainer" type="VBoxContainer" parent="PresetListDialog/PresetListScroll"]
|
|
unique_name_in_owner = true
|
|
layout_mode = 2
|
|
size_flags_horizontal = 3
|
|
theme_override_constants/separation = 6
|