mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-31 08:21:54 +08:00
feat(饲料卡片): 添加饲料品质显示功能
实现饲料品质的枚举定义和颜色映射,修改FeedCardBase使用FeedName组件显示品质
This commit is contained in:
@@ -6,13 +6,14 @@ signal selected(applied: bool)
|
||||
|
||||
@export var avatarTexture: Texture2D = preload("res://icon.svg")
|
||||
@export var displayName: String = "未命名饲料"
|
||||
@export var quality: FeedName.Quality = FeedName.Quality.COMMON
|
||||
@export var fields: Array[FieldStore.Entity] = []
|
||||
@export var fieldValues: Array[float] = []
|
||||
@export var costs: Array[ItemStore.ItemType] = []
|
||||
@export var costCounts: Array[int] = []
|
||||
|
||||
@onready var avatarRect: TextureRect = $"%avatar"
|
||||
@onready var nameLabel: RichTextLabel = $"%name"
|
||||
@onready var nameLabel: FeedName = $"%name"
|
||||
@onready var fieldsBox: VBoxContainer = $"%fields"
|
||||
@onready var costsBox: GridContainer = $"%costs"
|
||||
@onready var selectButton: Button = $"%selectBtn"
|
||||
@@ -23,7 +24,8 @@ func _ready():
|
||||
apply(UIState.player)
|
||||
)
|
||||
avatarRect.texture = avatarTexture
|
||||
nameLabel.text = "[b]" + displayName + "[/b]"
|
||||
nameLabel.displayName = displayName
|
||||
nameLabel.quality = quality
|
||||
for i in fieldsBox.get_children():
|
||||
i.queue_free()
|
||||
var noField = true
|
||||
|
||||
Reference in New Issue
Block a user