From f019cdd1e3bb83bd834fd2ad4ca3a556427c16c2 Mon Sep 17 00:00:00 2001 From: CactiChameleon9 Date: Mon, 25 Jul 2022 21:11:52 +0100 Subject: [PATCH] Switch to use new Unique Names --- UI/CardView.gd | 8 ++++---- UI/CardView.tscn | 3 +++ 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/UI/CardView.gd b/UI/CardView.gd index b534df2..a19ef16 100644 --- a/UI/CardView.gd +++ b/UI/CardView.gd @@ -26,13 +26,13 @@ func update_cardview(new_card = null): card = new_card # change the color of the panel to match the appropriate type - var card_style = $Background.get('custom_styles/panel').duplicate(true) + var card_style = $"%Background".get('custom_styles/panel').duplicate(true) card_style.set_bg_color(TYPE_COLORS[card.card_info.type]) - $Background.set('custom_styles/panel', card_style) + $"%Background".set('custom_styles/panel', card_style) # change the name and description - $VBox/Name.text = card.card_info.name - $VBox/Description.text = card.card_info.description + $"%Name".text = card.card_info.name + $"%Description".text = card.card_info.description # add the correct number of input dice views for i in card.card_info.number_of_dice: diff --git a/UI/CardView.tscn b/UI/CardView.tscn index 6bcb9b2..44d17fe 100644 --- a/UI/CardView.tscn +++ b/UI/CardView.tscn @@ -34,6 +34,7 @@ size_flags_vertical = 3 script = ExtResource( 1 ) [node name="Background" type="PanelContainer" parent="."] +unique_name_in_owner = true anchor_right = 1.0 anchor_bottom = 1.0 custom_styles/panel = SubResource( 6 ) @@ -47,6 +48,7 @@ margin_right = -10.0 margin_bottom = -10.0 [node name="Name" type="Label" parent="VBox"] +unique_name_in_owner = true margin_right = 295.0 margin_bottom = 31.0 custom_fonts/font = SubResource( 2 ) @@ -61,6 +63,7 @@ margin_right = 295.0 margin_bottom = 281.0 [node name="Description" type="Label" parent="VBox"] +unique_name_in_owner = true margin_top = 285.0 margin_right = 295.0 margin_bottom = 375.0