Only block confirm and cancel inputs with delayed option UI

This commit is contained in:
Flashfyre committed 2024-04-04 18:07:24 -04:00
1 parent 4f0b1fdcfb
commit 6a62ae1b5a
2 files changed
+6 -6

No files matched your search

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