refactor(map): 优化装备/技能信息弹窗布局逻辑

1. 调整信息框Y轴偏移量从80改为60
2. 新增弹窗自适应高度功能,根据内容动态调整弹窗尺寸
3. 采用顶部锚定模式,弹窗顶部固定偏移位置随内容高度自动向下延伸
4. 优化弹窗内边距和最小高度限制,避免弹窗过窄过矮
This commit is contained in:
panFD
2026-08-03 00:40:47 +08:00
parent 6ec4838c57
commit 0fe6542b87
4 changed files with 2926 additions and 90 deletions

View File

@@ -164,8 +164,8 @@ export class SkillBoxComp extends CCComp {
/** 长按时长(秒) */
private static readonly LONG_PRESS_TIME: number = 0.5;
/** IBox 相对图标的 Y 轴偏移(像素) */
private static readonly IBOX_OFFSET_Y: number = 80;
/** IBox 顶部相对图标的 Y 轴偏移(像素,弹窗顶部锚定在该点并向下生长 */
private static readonly IBOX_OFFSET_Y: number = 60;
/** 信息框是否已弹出(区分长按完成与短按取消) */
private info_shown: boolean = false;