Hi!! Lets say I have 4 choices and I disable choice 2 and 3. Is there a way that the cursor goes from choice 1 to choice 4, thus ignoring disabled choices?
Thank you!
Thank you!
Window_ChoiceList.prototype.cursorDown = function(wrap) {
var index = this.index();
var maxItems = this.maxItems();
var maxCols = this.maxCols();
if (index < maxItems - maxCols || (wrap && maxCols === 1)) {
let newIndex = (index + maxCols) % maxItems;
while (!$gameSystem.isChoiceEnabled(newIndex))
newIndex = newIndex<maxItems ? newIndex+1 : 0;
this.select(newIndex);
}
};
Window_ChoiceList.prototype.cursorUp = function(wrap) {
var index = this.index();
var maxItems = this.maxItems();
var maxCols = this.maxCols();
if (index >= maxCols || (wrap && maxCols === 1)) {
let newIndex = (index - maxCols + maxItems) % maxItems;
while (!$gameSystem.isChoiceEnabled(newIndex))
newIndex = newIndex>0 ? newIndex-1 : maxItems-1;
this.select(newIndex);
}
};
Original thread: https://forums.rpgmakerweb.com/threads/help-making-que-cursor-ignore-a-disabled-choice.160772/