fix: isolate battle save modal input

This commit is contained in:
2026-07-29 13:02:00 +09:00
parent b8ce6642a3
commit da7897ed77
2 changed files with 61 additions and 4 deletions

View File

@@ -4541,6 +4541,7 @@ export class BattleScene extends Phaser.Scene {
ambienceKey: presentationSoundscape?.ambienceKey ?? environmentProfile?.soundscape.ambienceKey,
ambienceVolume: presentationSoundscape?.ambienceVolume ?? environmentProfile?.soundscape.ambienceVolume
});
this.input.setTopOnly(true);
this.input.mouse?.disableContextMenu();
this.installBattleInputHandlers();
this.installBattleAutosaveHandlers();
@@ -22868,6 +22869,15 @@ export class BattleScene extends Phaser.Scene {
shade.setOrigin(0);
shade.setDepth(depth - 1);
shade.setInteractive();
shade.on(
'pointerdown',
(
_pointer: Phaser.Input.Pointer,
_localX: number,
_localY: number,
event?: { stopPropagation: () => void }
) => event?.stopPropagation()
);
this.saveSlotPanelObjects.push(shade);
const panel = this.add.rectangle(left, top, width, height, 0x0f1720, 0.98);
@@ -22875,6 +22885,15 @@ export class BattleScene extends Phaser.Scene {
panel.setDepth(depth);
panel.setStrokeStyle(this.battleUiLength(2), mode === 'save' ? palette.gold : palette.blue, 0.9);
panel.setInteractive();
panel.on(
'pointerdown',
(
_pointer: Phaser.Input.Pointer,
_localX: number,
_localY: number,
event?: { stopPropagation: () => void }
) => event?.stopPropagation()
);
this.saveSlotPanelObjects.push(panel);
const title = this.add.text(left + this.battleUiLength(22), top + this.battleUiLength(18), mode === 'save' ? '전투 수동 저장' : '수동 기록 불러오기', {
@@ -31683,7 +31702,13 @@ export class BattleScene extends Phaser.Scene {
text.setDepth(33);
const activate = () => {
if (this.activeFaction !== 'ally' || this.battleOutcome || this.remainingAllyCount() > 0) {
if (
this.saveSlotPanelObjects.length > 0 ||
this.turnPromptObjects.length > 0 ||
this.activeFaction !== 'ally' ||
this.battleOutcome ||
this.remainingAllyCount() > 0
) {
return;
}
this.suppressNextLeftClick = true;