fix:新道具栏关闭快捷键面板时只恢复已存在的监听

This commit is contained in:
ShakeFlower 2025-09-06 22:53:14 +08:00
parent a44545d611
commit 8678241111

View File

@ -3792,7 +3792,9 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
clear() { clear() {
super.clear(); super.clear();
const { back, itemInv, equipSlots, itemInfo } = UI; const { back, itemInv, equipSlots, itemInfo } = UI;
[back, itemInv, equipSlots, itemInfo].forEach((menu) => { menu.beginListen(); }); [back, itemInv, equipSlots, itemInfo].forEach(menu => {
if (menu.onDraw) menu.beginListen(); // 注意本来就没在绘制的则不监听
});
UI.itemInfo.drawContent(); // 快捷键图标会发生变化 UI.itemInfo.drawContent(); // 快捷键图标会发生变化
} }
} }