diff --git a/Client/origin-client/scenes/account/account_screen.gd b/Client/origin-client/scenes/account/account_screen.gd index 0cd9916..0683fe8 100644 --- a/Client/origin-client/scenes/account/account_screen.gd +++ b/Client/origin-client/scenes/account/account_screen.gd @@ -70,12 +70,12 @@ func _on_notifications_ok(p: Variant) -> void: for n in notifs: var nd := n as Dictionary var row := NOTIF_ROW.instantiate() + mailbox_list.add_child(row) row.setup( nd.get("title", "Notification"), nd.get("body", ""), nd.get("readAt", null) == null ) - mailbox_list.add_child(row) # ── Navigation ──────────────────────────────────────────────────────────────── diff --git a/Client/origin-client/scenes/collection/components/card_detail_popup.gd b/Client/origin-client/scenes/collection/components/card_detail_popup.gd index 0e29c5c..71104fc 100644 --- a/Client/origin-client/scenes/collection/components/card_detail_popup.gd +++ b/Client/origin-client/scenes/collection/components/card_detail_popup.gd @@ -93,8 +93,8 @@ func _populate_stats(def: Dictionary) -> void: func _add_stat(key: String, value: String) -> void: var row := _StatRow.instantiate() - row.setup(key, value) stats_grid.add_child(row) + row.setup(key, value) func _populate_abilities(def: Dictionary) -> void: @@ -124,8 +124,8 @@ func _populate_abilities(def: Dictionary) -> void: var desc := str(d.get("description", d.get("Description", ""))) var row := _AbilityRow.instantiate() - row.setup(name_, desc) abilities_list.add_child(row) + row.setup(name_, desc) func _on_overlay_input(event: InputEvent) -> void: diff --git a/Client/origin-client/scenes/free_play/free_play_screen.gd b/Client/origin-client/scenes/free_play/free_play_screen.gd index 17e5301..50b8989 100644 --- a/Client/origin-client/scenes/free_play/free_play_screen.gd +++ b/Client/origin-client/scenes/free_play/free_play_screen.gd @@ -133,9 +133,9 @@ func _populate_open_lobbies() -> void: var has_deck := not _selected_deck.is_empty() for lobby in _open_lobbies: var row := LOBBY_ROW.instantiate() - row.setup(lobby, has_deck) row.join_requested.connect(_on_row_join_requested) lobby_list_container.add_child(row) + row.setup(lobby, has_deck) func _on_row_join_requested(lobby_id: String, _has_password: bool) -> void: @@ -156,9 +156,9 @@ func _populate_active_games() -> void: return for game in _active_games: var row := ACTIVE_ROW.instantiate() - row.setup(game) row.spectate_requested.connect(_on_spectate_pressed) active_list_container.add_child(row) + row.setup(game) func _populate_create_deck_buttons() -> void: @@ -182,9 +182,9 @@ func _populate_create_deck_buttons() -> void: # Auto-press first button to reflect the auto-selected deck. if i == 0: btn.button_pressed = true - btn.setup(did, str(deck.get("name", "Unnamed Deck")), int(deck.get("cardCount", 0))) btn.picked.connect(func(id: String): _selected_deck = id) deck_select_container.add_child(btn) + btn.setup(did, str(deck.get("name", "Unnamed Deck")), int(deck.get("cardCount", 0))) # ── Action handlers ─────────────────────────────────────────────────────────── diff --git a/Client/origin-client/scenes/free_play/lobby_room_screen.gd b/Client/origin-client/scenes/free_play/lobby_room_screen.gd index 4632998..34de562 100644 --- a/Client/origin-client/scenes/free_play/lobby_room_screen.gd +++ b/Client/origin-client/scenes/free_play/lobby_room_screen.gd @@ -353,9 +353,9 @@ func _on_deck_picker_confirmed() -> void: func _on_edit_rules_pressed() -> void: var dlg := RULES_DIALOG.instantiate() - dlg.setup(_current_rules, CustomLobby.is_host) dlg.confirmed.connect(_on_rules_dialog_confirmed) add_child(dlg) + dlg.setup(_current_rules, CustomLobby.is_host) dlg.popup_centered() diff --git a/Client/origin-client/scenes/leaderboard/leaderboard_screen.gd b/Client/origin-client/scenes/leaderboard/leaderboard_screen.gd index fcc9f2b..bf83387 100644 --- a/Client/origin-client/scenes/leaderboard/leaderboard_screen.gd +++ b/Client/origin-client/scenes/leaderboard/leaderboard_screen.gd @@ -59,6 +59,7 @@ func _on_leaderboard_ok(p: Variant) -> void: for entry in entries: var e := entry as Dictionary var row := ROW.instantiate() + entry_list.add_child(row) row.setup( int(e.get("rank", 0)), e.get("displayName", "???"), @@ -66,7 +67,6 @@ func _on_leaderboard_ok(p: Variant) -> void: e.get("accountId", "") == Auth.user_id, int(e.get("rank", 99)) <= 3 ) - entry_list.add_child(row) func _update_pagination() -> void: diff --git a/Client/origin-client/scenes/matchmaking/matchmaking_screen.gd b/Client/origin-client/scenes/matchmaking/matchmaking_screen.gd index 1f1fe7e..334948d 100644 --- a/Client/origin-client/scenes/matchmaking/matchmaking_screen.gd +++ b/Client/origin-client/scenes/matchmaking/matchmaking_screen.gd @@ -76,15 +76,15 @@ func _on_decks_response(_type: String, payload: Variant) -> void: sub_label.text = "" for deck: Dictionary in decks: var btn := DECK_BTN.instantiate() + btn.picked.connect(func(id: String) -> void: + _selected_deck_id = id + _join_queue()) + deck_list.add_child(btn) btn.setup( str(deck.get("id", "")), str(deck.get("name", "Unnamed")), int(deck.get("cardCount", 0)) ) - btn.picked.connect(func(id: String) -> void: - _selected_deck_id = id - _join_queue()) - deck_list.add_child(btn) # ── Queue actions ───────────────────────────────────────────────────────────── diff --git a/Client/origin-client/scenes/starter_deck/starter_deck_screen.gd b/Client/origin-client/scenes/starter_deck/starter_deck_screen.gd index ca3cf8f..4b685a4 100644 --- a/Client/origin-client/scenes/starter_deck/starter_deck_screen.gd +++ b/Client/origin-client/scenes/starter_deck/starter_deck_screen.gd @@ -72,9 +72,9 @@ func _populate_list(decks: Array) -> void: var sub : String = ("%s · %d cards" % [arch, total]) if not arch.is_empty() \ else ("%d cards" % total) var card := CARD.instantiate() - card.setup(id, d.get("name", "Unknown Deck"), sub) card.selected.connect(_select_deck) deck_list.add_child(card) + card.setup(id, d.get("name", "Unknown Deck"), sub) func _select_deck(id: String) -> void: