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