diff --git a/UI/InputDiceView.gd b/UI/InputDiceView.gd index 8d6c2fb..f39abd3 100644 --- a/UI/InputDiceView.gd +++ b/UI/InputDiceView.gd @@ -1,9 +1,14 @@ tool extends Control + func _process(_delta): # update the pivot offset to make sure the object's animations # are always centered $Sprite.rect_pivot_offset = rect_size/2 $Particles2D.position = rect_size/2 + + +func set_extra_info(text : String): + $"%ExtraInfo".text = text diff --git a/UI/InputDiceView.tscn b/UI/InputDiceView.tscn index 7ede40f..1d34349 100644 --- a/UI/InputDiceView.tscn +++ b/UI/InputDiceView.tscn @@ -130,16 +130,6 @@ speed_scale = 2.0 process_material = SubResource( 12 ) texture = ExtResource( 2 ) -[node name="ExtraInfo" type="Label" parent="."] -anchor_right = 1.0 -anchor_bottom = 1.0 -size_flags_horizontal = 3 -size_flags_vertical = 3 -custom_colors/font_color = Color( 0, 0, 0, 1 ) -custom_fonts/font = SubResource( 7 ) -align = 1 -valign = 1 - [node name="Sprite" type="TextureRect" parent="."] anchor_right = 1.0 anchor_bottom = 1.0 @@ -150,6 +140,17 @@ texture = ExtResource( 2 ) expand = true stretch_mode = 6 +[node name="ExtraInfo" type="Label" parent="."] +unique_name_in_owner = true +anchor_right = 1.0 +anchor_bottom = 1.0 +size_flags_horizontal = 3 +size_flags_vertical = 3 +custom_colors/font_color = Color( 0, 0, 0, 1 ) +custom_fonts/font = SubResource( 7 ) +align = 1 +valign = 1 + [node name="AnimationPlayer" type="AnimationPlayer" parent="."] anims/Disappear = SubResource( 8 ) anims/RESET = SubResource( 9 )