ajout du déblocage/évolutions des plantes (#89) et fix divers
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
@tool
|
||||
extends VBoxContainer
|
||||
class_name QuotaRewardChoice
|
||||
|
||||
signal card_clicked(c : VBoxContainer)
|
||||
|
||||
var is_ready = false
|
||||
|
||||
@export var info : QuotaRewardChoiceInfo = null :
|
||||
set(v):
|
||||
info = v
|
||||
if is_ready : update()
|
||||
|
||||
@export_tool_button("Update", "Callable") var update_action = update
|
||||
|
||||
func _ready():
|
||||
update()
|
||||
%QuotaRewardCard.clicked.connect(
|
||||
func (_c : CardVisualiser):
|
||||
card_clicked.emit(self)
|
||||
)
|
||||
is_ready = true
|
||||
|
||||
func update():
|
||||
if info:
|
||||
%QuotaRewardTitle.text = info.title
|
||||
%QuotaRewardText.text = info.text
|
||||
%QuotaRewardCard.card_info = info.card_info
|
||||
%QuotaRewardCard.update()
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
uid://bhhhw2ywxmmba
|
||||
@@ -0,0 +1,8 @@
|
||||
extends Resource
|
||||
class_name QuotaRewardChoiceInfo
|
||||
|
||||
@export var title : String = ""
|
||||
|
||||
@export var text : String = ""
|
||||
|
||||
@export var card_info : CardInfo = null
|
||||
@@ -0,0 +1 @@
|
||||
uid://bist0wp4nrswp
|
||||
Reference in New Issue
Block a user