mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2024-12-01 19:26:16 +00:00
Only block confirm and cancel inputs with delayed option UI
This commit is contained in:
parent
4f0b1fdcfb
commit
6a62ae1b5a
@ -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) {
|
||||||
|
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user