1
1
mirror of https://github.com/Rundll86/Dog-Lynx-And-HCN.git synced 2026-06-03 01:41:53 +08:00

feat: 添加字段图标资源并实现图标显示功能

新增多种字段图标SVG资源文件及对应的.import配置
在FieldShow组件中添加图标显示功能
扩展ComponentManager以支持字段图标的加载和获取
调整FieldShow的布局以适应图标显示
This commit is contained in:
2025-09-30 18:24:40 +08:00
parent bc3368f25f
commit 4ce17ee3c4
57 changed files with 1038 additions and 4 deletions
+2
View File
@@ -10,6 +10,7 @@ class_name FieldShow
@export var maxed: bool = false
@export var showAdvantage: bool = false
@onready var icon: TextureRect = $"%icon"
@onready var nameLabel: Label = $"%name"
@onready var valueLabel: Label = $"%value"
@@ -19,6 +20,7 @@ func _ready():
if caster:
value = caster.call(entity, value)
nameLabel.text = FieldStore.entityMap[field]
icon.texture = ComponentManager.getFieldTexture(FieldStore.entityMap.get(field))
var formattedValue: String
var dataType = FieldStore.entityMapType[field]
if dataType == FieldStore.DataType.VALUE: