摘要: 拿掉游標靠近時人物縮小讓位、上方浮出圓形選單鈕的整套 hover 版面,選單只留右鍵與系統匣。 根本原因: 上一版照 Codex 的 petControlsAppearance 做了 proximity 版面,但那顆控制鈕的作用就是開選單, 而本程式的右鍵與系統匣已經有同樣的選單,多一顆按鈕沒有增加任何功能, 反而讓游標經過時人物會縮小位移。 影響: 滑鼠靠近時人物無謂地縮小、下移,並蓋出一顆重複功能的按鈕。 修法: - renderer:移除 HOVER_SCALE / HOVER_OFFSET_Y / PROXIMITY_ENTER / PROXIMITY_EXIT 常數, 以及 updateProximity / setNear / overControls / distanceToRect 與 near 狀態、 applyScale 裡的控制鈕定位、menu-btn 的事件繫結;mousemove 的點穿判定回到人物與氣泡兩者。 - index.html 移除 #controls;style.css 移除 body.near 的縮放位移與 #controls 樣式。 - package.json 版本 0.1.0 → 2.0.0。 - README 的日常使用、行為對照表、與 Codex 的對照三處同步更新, 對照表標明此項未採用及原因。 保留不變: 右鍵與系統匣選單、idle 放慢 6 倍、狀態優先序與到期、look 列縮放補正、 first-awake 問候、拖曳 4 px 方向閾值、reduced motion。 驗證: - 三個 js 檔語法檢查通過,全專案 grep 確認 controls / menu-btn / HOVER_ / PROXIMITY_ / body.near / setNear 等皆無殘留。 - 實機啟動:/health 正常,events.log 顯示 look rows rescaled 8 cells 仍正常觸發; 把游標移到人物上截圖,人物維持原尺寸原位置、無按鈕浮出(測後游標已復位)。 - 以 ELECTRON_RUN_AS_NODE 讀打包後 app.asar:版本 2.0.0、html 無 menu-btn、 css 無 body.near、js 無 proximity 邏輯,且右鍵選單、idle 放慢、look 補正、 狀態優先序都還在;exe 版本資訊為 2.0.0。 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
68 lines
1.2 KiB
CSS
68 lines
1.2 KiB
CSS
html, body {
|
|
margin: 0;
|
|
height: 100%;
|
|
background: transparent;
|
|
overflow: hidden;
|
|
user-select: none;
|
|
-webkit-user-select: none;
|
|
cursor: default;
|
|
font-family: "Segoe UI", "Microsoft JhengHei", "PingFang TC", system-ui, sans-serif;
|
|
}
|
|
|
|
#stage {
|
|
position: absolute;
|
|
inset: 0;
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
justify-content: flex-end;
|
|
padding-bottom: 8px;
|
|
}
|
|
|
|
#bubble {
|
|
position: relative;
|
|
max-width: calc(100% - 12px);
|
|
margin-bottom: 10px;
|
|
padding: 6px 11px;
|
|
background: rgba(255, 255, 255, 0.97);
|
|
color: #222;
|
|
border-radius: 12px;
|
|
font-size: 13px;
|
|
line-height: 1.35;
|
|
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.28);
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
transition: opacity 0.18s ease, transform 0.18s ease;
|
|
cursor: pointer;
|
|
}
|
|
|
|
#bubble::after {
|
|
content: "";
|
|
position: absolute;
|
|
left: 50%;
|
|
bottom: -6px;
|
|
transform: translateX(-50%);
|
|
border: 6px solid transparent;
|
|
border-top-color: rgba(255, 255, 255, 0.97);
|
|
border-bottom: 0;
|
|
}
|
|
|
|
#bubble.hidden {
|
|
opacity: 0;
|
|
transform: translateY(4px);
|
|
pointer-events: none;
|
|
}
|
|
|
|
#sprite {
|
|
display: block;
|
|
}
|
|
|
|
#sprite.grab {
|
|
cursor: grab;
|
|
}
|
|
|
|
#sprite.grabbing {
|
|
cursor: grabbing;
|
|
}
|