hotfix cursor selection
This commit is contained in:
parent
3a87c8657f
commit
0d406b1092
|
@ -331,11 +331,15 @@ export default class MenuUiHandler extends MessageUiHandler {
|
||||||
|
|
||||||
if (button === Button.ACTION) {
|
if (button === Button.ACTION) {
|
||||||
let adjustedCursor = this.cursor;
|
let adjustedCursor = this.cursor;
|
||||||
for (const imo of this.excludedMenus().find(e => e.condition).options.sort()) {
|
const excludedMenu = this.excludedMenus().find(e => e.condition);
|
||||||
if (adjustedCursor >= imo) {
|
if (excludedMenu !== null && excludedMenu.options.length > 0) {
|
||||||
adjustedCursor++;
|
const sortedOptions = excludedMenu.options.sort();
|
||||||
} else {
|
for (const imo of sortedOptions) {
|
||||||
break;
|
if (adjustedCursor >= imo) {
|
||||||
|
adjustedCursor++;
|
||||||
|
} else {
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
switch (adjustedCursor) {
|
switch (adjustedCursor) {
|
||||||
|
|
Loading…
Reference in New Issue