Add starter select screen cursor wraparound
parent
9310c4d340
commit
5010793a32
|
@ -533,6 +533,12 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
|
|||
this.setGenMode(true);
|
||||
success = true;
|
||||
break;
|
||||
case Button.LEFT:
|
||||
this.startCursorObj.setVisible(false);
|
||||
this.setGenMode(false);
|
||||
this.setCursor(this.cursor + 8);
|
||||
success = true;
|
||||
break;
|
||||
case Button.RIGHT:
|
||||
this.startCursorObj.setVisible(false);
|
||||
this.setGenMode(false);
|
||||
|
@ -554,6 +560,10 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
|
|||
success = true;
|
||||
}
|
||||
break;
|
||||
case Button.LEFT:
|
||||
success = this.setGenMode(false);
|
||||
this.setCursor(this.cursor + 8);
|
||||
break;
|
||||
case Button.RIGHT:
|
||||
success = this.setGenMode(false);
|
||||
break;
|
||||
|
@ -770,6 +780,11 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
|
|||
case Button.RIGHT:
|
||||
if (this.cursor % 9 < (row < rows - 1 ? 8 : (genStarters - 1) % 9))
|
||||
success = this.setCursor(this.cursor + 1);
|
||||
else {
|
||||
if (row >= Math.min(5, rows - 1))
|
||||
this.startCursorObj.setVisible(true);
|
||||
success = this.setGenMode(true);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue