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) {
|
||||
let adjustedCursor = this.cursor;
|
||||
const excludedMenu = this.excludedMenus().find(e => e.condition);
|
||||
if (excludedMenu !== undefined && excludedMenu.options !== undefined && excludedMenu.options.length > 0) {
|
||||
const sortedOptions = excludedMenu.options.sort();
|
||||
for (const imo of sortedOptions) {
|
||||
if (adjustedCursor >= imo) {
|
||||
adjustedCursor++;
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
for (const imo of this.ignoredMenuOptions) {
|
||||
if (adjustedCursor >= imo) {
|
||||
adjustedCursor++;
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
switch (adjustedCursor) {
|
||||
|
Loading…
Reference in New Issue
Block a user