Basic Extra Info Support

This commit is contained in:
CactiChameleon9 2022-07-25 20:25:57 +01:00
parent e84ea6786c
commit 5216632ee2
2 changed files with 16 additions and 4 deletions

View File

@ -1,3 +1,4 @@
tool
extends Control
const TYPE_COLORS = [
@ -36,6 +37,19 @@ func update_cardview(new_card = null):
# add the correct number of input dice views
for i in card.card_info.number_of_dice:
add_input_dice_view()
# set the extra info
var extra_text = ""
if card.card_info.addition_dice == true:
extra_text = card.addition_dice_amount
else:
for dice in card.card_info.accepted_dice:
extra_text += str(dice) + ", "
extra_text = extra_text.trim_suffix(", ")
for i in input_dice_views:
i.set_extra_info(extra_text)
# add an input_dice_view to the array (for easy management)

View File

@ -4,7 +4,7 @@
[ext_resource path="res://Assets/Metropolis-font/Metropolis-Bold.ttf" type="DynamicFontData" id=4]
[ext_resource path="res://AutoGridContainer - Full Version/AutoGridContainer.tscn" type="PackedScene" id=6]
[sub_resource type="StyleBoxFlat" id=8]
[sub_resource type="StyleBoxFlat" id=6]
bg_color = Color( 0.858824, 0.278431, 0.345098, 1 )
corner_radius_top_left = 20
corner_radius_top_right = 20
@ -36,7 +36,7 @@ script = ExtResource( 1 )
[node name="Background" type="PanelContainer" parent="."]
anchor_right = 1.0
anchor_bottom = 1.0
custom_styles/panel = SubResource( 8 )
custom_styles/panel = SubResource( 6 )
[node name="VBox" type="VBoxContainer" parent="."]
anchor_right = 1.0
@ -56,8 +56,6 @@ autowrap = true
[node name="AutoGrid" parent="VBox" instance=ExtResource( 6 )]
unique_name_in_owner = true
anchor_right = 0.0
anchor_bottom = 0.0
margin_top = 35.0
margin_right = 295.0
margin_bottom = 281.0