Only block confirm and cancel inputs with delayed option UI

This commit is contained in:
Flashfyre 2024-04-04 18:07:24 -04:00
parent 4f0b1fdcfb
commit 6a62ae1b5a
2 changed files with 6 additions and 6 deletions

View File

@ -110,9 +110,6 @@ export default abstract class AbstractOptionSelectUiHandler extends UiHandler {
}
processInput(button: Button): boolean {
if (this.blockInput)
return false;
const ui = this.getUi();
let success = false;
@ -122,6 +119,9 @@ export default abstract class AbstractOptionSelectUiHandler extends UiHandler {
let playSound = true;
if (button === Button.ACTION || button === Button.CANCEL) {
if (this.blockInput)
return false;
success = true;
if (button === Button.CANCEL) {
if (this.config?.maxOptions && this.config.options.length > this.config.maxOptions) {

View File

@ -74,14 +74,14 @@ export default class BiomeSelectUiHandler extends UiHandler {
}
processInput(button: Button): boolean {
if (this.blockInput)
return false;
const ui = this.getUi();
let success = false;
if (button === Button.ACTION || button === Button.CANCEL) {
if (this.blockInput)
return false;
success = true;
const originalBiomeSelectHandler = this.biomeSelectHandler;
this.biomeSelectHandler = null;