Fix: card_detail_popup use add_theme_*_override instead of dict access

theme_override_constants["key"] and theme_override_font_sizes["key"]
throw on nodes not yet in the scene tree. Replaced with the proper
add_theme_constant_override() / add_theme_font_size_override() calls.

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>
This commit is contained in:
dingo
2026-03-08 18:00:58 -04:00
co-authored by Claude Happy
parent bc65e8b9d4
commit b3ce6a1200
@@ -133,18 +133,18 @@ func _populate_abilities(def: Dictionary) -> void:
var desc := str(d.get("description", d.get("Description", "")))
var row := VBoxContainer.new()
row.theme_override_constants["separation"] = 2
row.add_theme_constant_override("separation", 2)
var name_lbl := Label.new()
name_lbl.text = "[%s]" % name_
name_lbl.theme_override_font_sizes["font_size"] = 13
name_lbl.add_theme_font_size_override("font_size", 13)
name_lbl.modulate = Color(0.90, 0.80, 0.50)
row.add_child(name_lbl)
if not desc.is_empty():
var desc_lbl := Label.new()
desc_lbl.text = desc
desc_lbl.theme_override_font_sizes["font_size"] = 12
desc_lbl.add_theme_font_size_override("font_size", 12)
desc_lbl.autowrap_mode = TextServer.AUTOWRAP_WORD_SMART
desc_lbl.modulate = Color(0.80, 0.80, 0.85)
row.add_child(desc_lbl)