feat(ibox): 实现信息弹窗背景自适应高度功能

1. 重构IBoxComp组件,移除旧的标题名称渲染逻辑
2. 添加动态背景节点,根据RichText内容自动调整高度
3. 优化cardbg和herobox预制体样式,调整尺寸与透明度
4. 新增通用背景预制体hbg,支持多配色快速复用
5. 重写ibox预制体结构,适配新的组件逻辑
This commit is contained in:
panFD
2026-08-07 21:51:48 +08:00
parent bcc57de312
commit 4caf20d4b2
8 changed files with 6127 additions and 2400 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,13 @@
{
"ver": "1.1.50",
"importer": "prefab",
"imported": true,
"uuid": "57e33de6-9b39-4744-90ac-987944a47da8",
"files": [
".json"
],
"subMetas": {},
"userData": {
"syncNodeName": "hbg"
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -420,7 +420,7 @@
"r": 255,
"g": 255,
"b": 255,
"a": 120
"a": 255
},
"_spriteFrame": {
"__uuid__": "cb93c900-b440-4571-91d1-7da1636e3d73@6c895",
@@ -615,8 +615,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 280,
"height": 280
"width": 300,
"height": 300
},
"_anchorPoint": {
"__type__": "cc.Vec2",
@@ -737,8 +737,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 140,
"height": 140
"width": 150,
"height": 150
},
"_anchorPoint": {
"__type__": "cc.Vec2",
@@ -765,9 +765,9 @@
},
"_alignFlags": 41,
"_target": null,
"_left": 15,
"_right": 15,
"_top": 15,
"_left": 10,
"_right": 10,
"_top": 10,
"_bottom": 115,
"_horizontalCenter": 0,
"_verticalCenter": 0,
@@ -938,7 +938,7 @@
"__id__": 57
}
],
"_active": false,
"_active": true,
"_components": [
{
"__id__": 71
@@ -1258,7 +1258,7 @@
"r": 255,
"g": 255,
"b": 255,
"a": 120
"a": 255
},
"_spriteFrame": {
"__uuid__": "cb93c900-b440-4571-91d1-7da1636e3d73@6c895",
@@ -1453,8 +1453,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 280,
"height": 280
"width": 300,
"height": 300
},
"_anchorPoint": {
"__type__": "cc.Vec2",
@@ -1575,8 +1575,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 140,
"height": 140
"width": 150,
"height": 150
},
"_anchorPoint": {
"__type__": "cc.Vec2",
@@ -1603,9 +1603,9 @@
},
"_alignFlags": 41,
"_target": null,
"_left": 15,
"_right": 15,
"_top": 15,
"_left": 10,
"_right": 10,
"_top": 10,
"_bottom": 115,
"_horizontalCenter": 0,
"_verticalCenter": 0,
@@ -1776,7 +1776,7 @@
"__id__": 95
}
],
"_active": false,
"_active": true,
"_components": [
{
"__id__": 109
@@ -2096,7 +2096,7 @@
"r": 255,
"g": 255,
"b": 255,
"a": 120
"a": 255
},
"_spriteFrame": {
"__uuid__": "cb93c900-b440-4571-91d1-7da1636e3d73@6c895",
@@ -2291,8 +2291,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 280,
"height": 280
"width": 300,
"height": 300
},
"_anchorPoint": {
"__type__": "cc.Vec2",
@@ -2413,8 +2413,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 140,
"height": 140
"width": 150,
"height": 150
},
"_anchorPoint": {
"__type__": "cc.Vec2",
@@ -2441,9 +2441,9 @@
},
"_alignFlags": 41,
"_target": null,
"_left": 15,
"_right": 15,
"_top": 15,
"_left": 10,
"_right": 10,
"_top": 10,
"_bottom": 115,
"_horizontalCenter": 0,
"_verticalCenter": 0,
@@ -2614,7 +2614,7 @@
"__id__": 133
}
],
"_active": false,
"_active": true,
"_components": [
{
"__id__": 147
@@ -2934,7 +2934,7 @@
"r": 255,
"g": 255,
"b": 255,
"a": 120
"a": 255
},
"_spriteFrame": {
"__uuid__": "cb93c900-b440-4571-91d1-7da1636e3d73@6c895",
@@ -3129,8 +3129,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 280,
"height": 280
"width": 300,
"height": 300
},
"_anchorPoint": {
"__type__": "cc.Vec2",
@@ -3251,8 +3251,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 140,
"height": 140
"width": 150,
"height": 150
},
"_anchorPoint": {
"__type__": "cc.Vec2",
@@ -3279,9 +3279,9 @@
},
"_alignFlags": 41,
"_target": null,
"_left": 15,
"_right": 15,
"_top": 15,
"_left": 10,
"_right": 10,
"_top": 10,
"_bottom": 115,
"_horizontalCenter": 0,
"_verticalCenter": 0,
@@ -3452,7 +3452,7 @@
"__id__": 171
}
],
"_active": false,
"_active": true,
"_components": [
{
"__id__": 185
@@ -3772,7 +3772,7 @@
"r": 255,
"g": 255,
"b": 255,
"a": 120
"a": 255
},
"_spriteFrame": {
"__uuid__": "cb93c900-b440-4571-91d1-7da1636e3d73@6c895",
@@ -3967,8 +3967,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 280,
"height": 280
"width": 300,
"height": 300
},
"_anchorPoint": {
"__type__": "cc.Vec2",
@@ -4089,8 +4089,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 140,
"height": 140
"width": 150,
"height": 150
},
"_anchorPoint": {
"__type__": "cc.Vec2",
@@ -4117,9 +4117,9 @@
},
"_alignFlags": 41,
"_target": null,
"_left": 15,
"_right": 15,
"_top": 15,
"_left": 10,
"_right": 10,
"_top": 10,
"_bottom": 115,
"_horizontalCenter": 0,
"_verticalCenter": 0,

View File

@@ -2998,7 +2998,7 @@
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": -62.269,
"y": -60.02,
"z": 0
},
"_lrot": {
@@ -3010,8 +3010,8 @@
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 0.2,
"y": 0.3,
"x": 0.15,
"y": 0.15,
"z": 1
},
"_mobility": 0,
@@ -3069,10 +3069,10 @@
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
"r": 61,
"g": 61,
"b": 61,
"a": 195
},
"_spriteFrame": {
"__uuid__": "cb93c900-b440-4571-91d1-7da1636e3d73@34d88",
@@ -3627,7 +3627,7 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 84,
"width": 92,
"height": 35.373999999999995
},
"_anchorPoint": {
@@ -3666,8 +3666,8 @@
"_string": "英雄名称",
"_horizontalAlign": 1,
"_verticalAlign": 1,
"_actualFontSize": 20,
"_fontSize": 20,
"_actualFontSize": 22,
"_fontSize": 22,
"_fontFamily": "Arial",
"_lineHeight": 24.9,
"_overflow": 0,
@@ -3782,7 +3782,7 @@
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": -117.839,
"y": -113.062,
"z": 0
},
"_lrot": {
@@ -3822,7 +3822,7 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 47.1671468533978,
"width": 51.483861538737585,
"height": 54.4
},
"_anchorPoint": {
@@ -3861,8 +3861,8 @@
"_string": "Lv.1",
"_horizontalAlign": 1,
"_verticalAlign": 1,
"_actualFontSize": 20,
"_fontSize": 20,
"_actualFontSize": 22,
"_fontSize": 22,
"_fontFamily": "Arial",
"_lineHeight": 40,
"_overflow": 0,
@@ -4416,7 +4416,7 @@
},
"_lpos": {
"__type__": "cc.Vec3",
"x": -22.182,
"x": -25.305,
"y": 0,
"z": 0
},
@@ -4529,7 +4529,7 @@
},
"_lpos": {
"__type__": "cc.Vec3",
"x": -72.49951171875,
"x": -69.669921875,
"y": 0,
"z": 0
},
@@ -4570,8 +4570,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 45.0009765625,
"height": 27.814
"width": 50.66015625,
"height": 30.46
},
"_anchorPoint": {
"__type__": "cc.Vec2",
@@ -4601,34 +4601,34 @@
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 32,
"g": 32,
"b": 32,
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_string": "攻击:",
"_horizontalAlign": 1,
"_verticalAlign": 1,
"_actualFontSize": 18,
"_fontSize": 18,
"_actualFontSize": 20,
"_fontSize": 20,
"_fontFamily": "Arial",
"_lineHeight": 18.9,
"_lineHeight": 21,
"_overflow": 0,
"_enableWrapText": true,
"_font": null,
"_isSystemFontUsed": true,
"_spacingX": 0,
"_isItalic": false,
"_isBold": false,
"_isBold": true,
"_isUnderline": false,
"_underlineHeight": 2,
"_cacheMode": 0,
"_enableOutline": true,
"_outlineColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"r": 0,
"g": 0,
"b": 0,
"a": 255
},
"_outlineWidth": 2,
@@ -4688,7 +4688,7 @@
},
"_lpos": {
"__type__": "cc.Vec3",
"x": -26.9775390625,
"x": -19.09375,
"y": 0,
"z": 0
},
@@ -4729,8 +4729,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 44.04296875,
"height": 27.94
"width": 48.4921875,
"height": 30.46
},
"_anchorPoint": {
"__type__": "cc.Vec2",
@@ -4760,18 +4760,18 @@
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 0,
"g": 0,
"b": 0,
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_string": "9999",
"_horizontalAlign": 1,
"_verticalAlign": 1,
"_actualFontSize": 18,
"_fontSize": 18,
"_actualFontSize": 20,
"_fontSize": 20,
"_fontFamily": "Arial",
"_lineHeight": 19,
"_lineHeight": 21,
"_overflow": 0,
"_enableWrapText": true,
"_font": null,
@@ -4785,9 +4785,9 @@
"_enableOutline": true,
"_outlineColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"r": 0,
"g": 0,
"b": 0,
"a": 255
},
"_outlineWidth": 2,
@@ -4847,7 +4847,7 @@
},
"_lpos": {
"__type__": "cc.Vec3",
"x": -3.9560546875,
"x": 6.15234375,
"y": 0,
"z": 0
},
@@ -4888,8 +4888,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 56.5322265625,
"height": 27.94
"width": 62.369140625,
"height": 30.46
},
"_anchorPoint": {
"__type__": "cc.Vec2",
@@ -4927,17 +4927,17 @@
"_string": "(+999)",
"_horizontalAlign": 0,
"_verticalAlign": 1,
"_actualFontSize": 18,
"_fontSize": 18,
"_actualFontSize": 20,
"_fontSize": 20,
"_fontFamily": "Arial",
"_lineHeight": 19,
"_lineHeight": 21,
"_overflow": 0,
"_enableWrapText": true,
"_font": null,
"_isSystemFontUsed": true,
"_spacingX": 0,
"_isItalic": false,
"_isBold": false,
"_isBold": true,
"_isUnderline": false,
"_underlineHeight": 2,
"_cacheMode": 0,
@@ -5184,7 +5184,7 @@
},
"_lpos": {
"__type__": "cc.Vec3",
"x": -72.49951171875,
"x": -69.669921875,
"y": 0,
"z": 0
},
@@ -5225,8 +5225,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 45.0009765625,
"height": 27.814
"width": 50.66015625,
"height": 30.46
},
"_anchorPoint": {
"__type__": "cc.Vec2",
@@ -5256,34 +5256,34 @@
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 32,
"g": 32,
"b": 32,
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_string": "生命:",
"_horizontalAlign": 1,
"_verticalAlign": 1,
"_actualFontSize": 18,
"_fontSize": 18,
"_actualFontSize": 20,
"_fontSize": 20,
"_fontFamily": "Arial",
"_lineHeight": 18.9,
"_lineHeight": 21,
"_overflow": 0,
"_enableWrapText": true,
"_font": null,
"_isSystemFontUsed": true,
"_spacingX": 0,
"_isItalic": false,
"_isBold": false,
"_isBold": true,
"_isUnderline": false,
"_underlineHeight": 2,
"_cacheMode": 0,
"_enableOutline": true,
"_outlineColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"r": 0,
"g": 0,
"b": 0,
"a": 255
},
"_outlineWidth": 2,
@@ -5343,7 +5343,7 @@
},
"_lpos": {
"__type__": "cc.Vec3",
"x": -26.9775390625,
"x": -19.09375,
"y": 0,
"z": 0
},
@@ -5384,8 +5384,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 44.04296875,
"height": 27.94
"width": 48.4921875,
"height": 30.46
},
"_anchorPoint": {
"__type__": "cc.Vec2",
@@ -5415,18 +5415,18 @@
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 0,
"g": 0,
"b": 0,
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_string": "9999",
"_horizontalAlign": 1,
"_verticalAlign": 1,
"_actualFontSize": 18,
"_fontSize": 18,
"_actualFontSize": 20,
"_fontSize": 20,
"_fontFamily": "Arial",
"_lineHeight": 19,
"_lineHeight": 21,
"_overflow": 0,
"_enableWrapText": true,
"_font": null,
@@ -5440,9 +5440,9 @@
"_enableOutline": true,
"_outlineColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"r": 0,
"g": 0,
"b": 0,
"a": 255
},
"_outlineWidth": 2,
@@ -5502,7 +5502,7 @@
},
"_lpos": {
"__type__": "cc.Vec3",
"x": -3.9560546875,
"x": 6.15234375,
"y": 0,
"z": 0
},
@@ -5543,8 +5543,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 56.5322265625,
"height": 27.94
"width": 62.369140625,
"height": 30.46
},
"_anchorPoint": {
"__type__": "cc.Vec2",
@@ -5582,17 +5582,17 @@
"_string": "(+999)",
"_horizontalAlign": 0,
"_verticalAlign": 1,
"_actualFontSize": 18,
"_fontSize": 18,
"_actualFontSize": 20,
"_fontSize": 20,
"_fontFamily": "Arial",
"_lineHeight": 19,
"_lineHeight": 21,
"_overflow": 0,
"_enableWrapText": true,
"_font": null,
"_isSystemFontUsed": true,
"_spacingX": 0,
"_isItalic": false,
"_isBold": false,
"_isBold": true,
"_isUnderline": false,
"_underlineHeight": 2,
"_cacheMode": 0,
@@ -5799,7 +5799,7 @@
"_right": 437.303,
"_top": -2.5,
"_bottom": -2.5,
"_horizontalCenter": -22.182,
"_horizontalCenter": -25.305,
"_verticalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,

File diff suppressed because it is too large Load Diff