When any menu has 1 column you can 'page up' from the start backwards to the end of a list, but when there is more than 1 column, this is not possible. Why? And is there a way to fix it?
MV Columns
JS Plugin RequestsPlease give some specific examples so we can look at the windows you're looking at.
What's a multi-column list that demonstrates this behavior?
What's a multi-column list that demonstrates this behavior?
The default
Some scenes manually assign a custom
pageup/pagedown handler for selectable windows scrolls up/down by 1 "page" worth of entries. E.g. if a list shows 10 entries at once, pageup should scroll up by 10 rows.Some scenes manually assign a custom
pageup/pagedown handler to certain windows. Typically this is for navigating to the previous/next actor, e.g. on the status, skill, and equip scenes. If a custom handler is assigned, it replaces the default one.This is a list with 1 column:
This is a list with two columns:
And this a list with three columns:
In all of this I can pageup and pagedown normally and I can go up and down with the directional buttons, but only when there is 1 column I can be at the top of the list, then I would press 'up' and it would take me backwards to the end of the list, but this is not possible when there is more than 1 column.
This is a list with two columns:
And this a list with three columns:
In all of this I can pageup and pagedown normally and I can go up and down with the directional buttons, but only when there is 1 column I can be at the top of the list, then I would press 'up' and it would take me backwards to the end of the list, but this is not possible when there is more than 1 column.
Two of those lists are done with the SuperToolsEngine, but if I change the maxCols in the rpg_windows, the same thing happens with every menu, as long as there is more than column I can't do the 'go from the top to the bottom'
Unless I'm misreading you, you've said two different keys in your posts - do you want the Up arrow to loop or Page Up?
Sorry, I meant the 'Up' one.
Ah, OK. You may find that is called "cursor wrap". You'll need a plugin to change that, so:
I see a couple of possible solutions:
I've moved this thread to JS Plugin Requests (from MV Support). Thank you.
By default selectable windows can wrap only when moving up from the first entry (index 0) or down from the last entry. Wrapping is disabled entirely for windows with more than one column, but I think that's a UX choice, not a design limitation.
I see a couple of possible solutions:
- Select the first/last entry if scrolling up/down fails. I think this should do that:
JavaScript:/*: * @target MV * @plugindesc Selectable windows can change column on failed cursor up/down. * @author Caethyril * @url https://forums.rpgmakerweb.com/threads/158248/ * @help Free to use and/or modify for any project, no credit required. */ ;void (function(alias) { Window_Selectable.prototype.cursorUp = function(wrap) { var ix = this.index(); alias.apply(this, arguments); if (wrap && ix === this.index()) this.select(0); }; })(Window_Selectable.prototype.cursorUp); void (function(alias) { Window_Selectable.prototype.cursorDown = function(wrap) { var ix = this.index(); alias.apply(this, arguments); if (wrap && ix === this.index()) this.select(this.maxItems() - 1); }; })(Window_Selectable.prototype.cursorDown); - Wrap when moving up from the top row or down from the bottom row. This might work?
JavaScript:/*: * @target MV * @plugindesc Selectable windows now wrap by row, not index. * @author Caethyril * @url https://forums.rpgmakerweb.com/threads/158248/ * @help Free to use and/or modify for any project, no credit required. */ ;void (function(alias) { Window_Selectable.prototype.cursorUp = function(wrap) { var ix = this.index(); alias.apply(this, arguments); if (wrap && ix === this.index()) { var c = this.maxCols(); this.select(this.maxItems() - c + ix % c); } }; })(Window_Selectable.prototype.cursorUp); void (function(alias) { Window_Selectable.prototype.cursorDown = function(wrap) { var ix = this.index(); alias.apply(this, arguments); if (wrap && ix === this.index()) this.select(ix % this.maxCols()); }; })(Window_Selectable.prototype.cursorDown);
=> in each code snippet, which was causing a syntax error. Tested them this time and they both seem to work as intended. 😴]Where do I put this? Do I save it as a plugin together or two plugins separately?
I put them as plugins but I see no change.
Neither of them work? Did you try both solutions separately?
Sorry! They both had the same copy-paste syntax error, so each plugin got rejected on game load, hence no effect. 😅
I've edited my previous post with the corrected code. I tested them both this time, and they both seem to work as intended. Like AquaEcho implies, though, only use one of them. Hope that helps! 👋
I've edited my previous post with the corrected code. I tested them both this time, and they both seem to work as intended. Like AquaEcho implies, though, only use one of them. Hope that helps! 👋
I will test them, sorry for not answering I am not at home to use my pc.
Take your time, no worries!
It works! Thanks a lot for the help!
Great! Happy RPG Making~ 😂
Original thread: https://forums.rpgmakerweb.com/threads/columns.158248/