Switch to use new Unique Names

This commit is contained in:
CactiChameleon9 2022-07-25 21:11:52 +01:00
parent f4b9d4718b
commit f019cdd1e3
2 changed files with 7 additions and 4 deletions

View File

@ -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:

View File

@ -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