Add connect_signals method for CardView
This commit is contained in:
parent
321defe228
commit
5d0b1933b6
@ -17,6 +17,7 @@ var card : Card = Card.new() setget update_cardview
|
|||||||
|
|
||||||
func _ready():
|
func _ready():
|
||||||
update_cardview()
|
update_cardview()
|
||||||
|
connect_signals()
|
||||||
|
|
||||||
|
|
||||||
func update_cardview(new_card = null):
|
func update_cardview(new_card = null):
|
||||||
@ -24,6 +25,7 @@ func update_cardview(new_card = null):
|
|||||||
# allow the update card function to work with and without setget
|
# allow the update card function to work with and without setget
|
||||||
if new_card != null:
|
if new_card != null:
|
||||||
card = new_card
|
card = new_card
|
||||||
|
connect_signals()
|
||||||
|
|
||||||
# change the color of the panel to match the appropriate type
|
# 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)
|
||||||
@ -65,3 +67,7 @@ func add_input_dice_view():
|
|||||||
var dice_view = input_dice_view.instance()
|
var dice_view = input_dice_view.instance()
|
||||||
input_dice_views.append(dice_view)
|
input_dice_views.append(dice_view)
|
||||||
$"%AutoGrid".add_child(dice_view)
|
$"%AutoGrid".add_child(dice_view)
|
||||||
|
|
||||||
|
|
||||||
|
func connect_signals():
|
||||||
|
card.connect("card_removed", self, "card_view_use")
|
||||||
|
Loading…
Reference in New Issue
Block a user