From 6a62ae1b5acfed7a279a5f2161efa30a1e54361e Mon Sep 17 00:00:00 2001 From: Flashfyre Date: Thu, 4 Apr 2024 18:07:24 -0400 Subject: [PATCH] Only block confirm and cancel inputs with delayed option UI --- src/ui/abstact-option-select-ui-handler.ts | 6 +++--- src/ui/biome-select-ui-handler.ts | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/ui/abstact-option-select-ui-handler.ts b/src/ui/abstact-option-select-ui-handler.ts index 92a1963f3..c3ccddff4 100644 --- a/src/ui/abstact-option-select-ui-handler.ts +++ b/src/ui/abstact-option-select-ui-handler.ts @@ -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) { diff --git a/src/ui/biome-select-ui-handler.ts b/src/ui/biome-select-ui-handler.ts index ff0a6a882..083a13d02 100644 --- a/src/ui/biome-select-ui-handler.ts +++ b/src/ui/biome-select-ui-handler.ts @@ -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;