人物属性界面(InvChar6)文字与背景凹槽石框没有对齐 #138
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
问题描述
参考截图:https://screenshot-v2.corp.google.com/2mupf6g92p8hg
打开人物属性面板(快捷键
A/C)时,力量、敏捷、体力、精力、左右键伤害、命中率、防御力、耐力/生命/法力及四系抗性的标签和数值均落在了InvChar6.dc6背景石框的下方或框外。根因分析
通过对
public/ui/char-sheet.png(320×432)进行逐像素凹槽框扫描发现:y = 91,但代码写成了y = 112(整体向下偏了 +21px);y = 153,代码写成了y = 174;y = 239,代码写成了y = 260;y = 301,代码写成了y = 324;y = 91, 115)、命中率(y = 152, 176)、防御(y = 201)、耐力/生命/法力(y = 238, 262, 300)、四抗(y = 341, 365, 389, 413)同样存在 15~25px 的垂直偏移与水平分栏偏移。解决方案
依据
InvChar6.dc6像素级实测的石框边界(精确到 1px),校准所有标签框与数值框的(cx, cy)坐标及红色加点按钮坐标,确保每一个文字和数字都垂直/水平居中于对应的石刻凹槽内。验证通过并已随提交
14443c6修复关单改动方案:
src/ui/character-sheet.ts中重写各属性条目坐标。验证结果:
tests/ui-hud.test.ts坐标与断言 100% 通过。