fix(hand): use add_theme_*_override instead of dictionary accessors for dynamic nodes
theme_override_* dict syntax requires the node to already be in the tree. Use add_theme_constant_override / add_theme_font_size_override instead. 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:
@@ -4564,15 +4564,15 @@ func _show_next_card_popup() -> void:
|
||||
vbox.set_anchors_preset(Control.PRESET_CENTER)
|
||||
vbox.grow_horizontal = Control.GROW_DIRECTION_BOTH
|
||||
vbox.grow_vertical = Control.GROW_DIRECTION_BOTH
|
||||
vbox.theme_override_constants["separation"] = 16
|
||||
vbox.alignment = BoxContainer.ALIGNMENT_CENTER
|
||||
_popup_layer.add_child(vbox)
|
||||
vbox.add_theme_constant_override("separation", 16)
|
||||
|
||||
var lbl := Label.new()
|
||||
lbl.text = "Card Drawn — click to add to hand"
|
||||
lbl.horizontal_alignment = HORIZONTAL_ALIGNMENT_CENTER
|
||||
lbl.theme_override_font_sizes["font_size"] = 16
|
||||
vbox.add_child(lbl)
|
||||
lbl.add_theme_font_size_override("font_size", 16)
|
||||
|
||||
var widget : PanelContainer = _CARD_WIDGET_SCENE.instantiate()
|
||||
widget.custom_minimum_size = Vector2(200, 320)
|
||||
|
||||
Reference in New Issue
Block a user