mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-01 05:52:17 +02:00
Merging menu-ui-handler.ts
This commit is contained in:
parent
c1fa6501bc
commit
24c8b1bfc7
@ -306,15 +306,11 @@ export default class MenuUiHandler extends MessageUiHandler {
|
|||||||
|
|
||||||
if (button === Button.ACTION) {
|
if (button === Button.ACTION) {
|
||||||
let adjustedCursor = this.cursor;
|
let adjustedCursor = this.cursor;
|
||||||
const excludedMenu = this.excludedMenus().find(e => e.condition);
|
for (const imo of this.ignoredMenuOptions) {
|
||||||
if (excludedMenu !== undefined && excludedMenu.options !== undefined && excludedMenu.options.length > 0) {
|
if (adjustedCursor >= imo) {
|
||||||
const sortedOptions = excludedMenu.options.sort();
|
adjustedCursor++;
|
||||||
for (const imo of sortedOptions) {
|
} else {
|
||||||
if (adjustedCursor >= imo) {
|
break;
|
||||||
adjustedCursor++;
|
|
||||||
} else {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
switch (adjustedCursor) {
|
switch (adjustedCursor) {
|
||||||
|
Loading…
Reference in New Issue
Block a user