Cycling through Horizontal commands

Good day RPG Makers,

Here's another question, What controls the commands moving?
I suppose it would be the same for lists as well.
What I'm encountering is a horizontal command list that doesn't display the last command in the list.
If I have 4 commands and I display two at a time, it will select and highlight the third and be seen on the screen, but if the fourth is selected it is not seen on the screen. This happens for 1 & 2 command displays.
If I only display one command at a time then it does not show any other command except the first.
If I display two commands it will shift/cycle to the third but not the fourth
it it displays 3 commands it will shift/cycle to the fourth. some commands are squished
if I display 4 commands everything is there and squished.

What am I missing here?

4 ->
1697029550622.png
<- 4 displayed
3 ->
1697029489742.png
<- 4 displayed
2 ->
1697029632203.png
<- 3 displayed, fourth hidden (currently selected)
1 ->
1697029701673.png
<- 1 displayed, never moves to another command, but commands are selectable

If I have 5 skills then the 4 and 3 work fine, but the 2 and 1 do not.
I want the option to have 1 displayed and have it cycle through the commands but it seems to only work if there are 3 or more.

I copied and modified the cursor_left and right methods to remove the col_max part.

As always I figured it out shortly after posting.
The top_col=(col) was limiting the commands.
changing the col = col_max - 1 if col > col_max - 1
into col = item_max if col > item_max
works
You could have just defined col_max as a wrapper for item_max and that's it. (I'm unsure if there'd be a need for it to subtract 1 to its value like col_max normally does, but you can test that yourself.)
You could have just defined col_max as a wrapper for item_max and that's it. (I'm unsure if there'd be a need for it to subtract 1 to its value like col_max normally does, but you can test that yourself.)
If I understand you correctly that would be setting the col_max to the item_max
That would not work as I want to display 1 or 2 commands but the player can have from 1 to 5 or more commands.
Since I have col_max defined to use a value or either 1 or 2 , maybe 3 but the list of commands can range from 1 to whatever the player has available to them. If the col_max was equal to item_max then all the commands would show and they would squish on the screen. Since I'm also controlling the width of the window.

Original thread: https://forums.rpgmakerweb.com/threads/cycling-through-horizontal-commands.161912/