[RMXP] Rye's Collapsed CMS extra row?

I recently discovered Rye's Collapsed CMS and am editing it to fit my game better. I've run into a problem though: I have a lot more menu commands than this script uses, but they don't all fit on the first row. So I want to add an extra row, but how do I do that?
I have discovered how to make the height of the window longer, but not how to have the commands show up on this second row of the window.

Your help is much appreciated 🙂
Code:
@column_max = commands.size
This is the line that determines that, as it basically just makes all the commands span one column. If you want it to cover multiple rows, change it so that it's a lower number than the number of commands there are and that should do the trick.
@Trihan So I tried that out and changed it to 4 (I've got 8 commands, so 4 per row is what I'm aiming at), but it just shows the last 4 commands now and not the others. Is there anything else I need to change?
Is the window tall enough to show both rows and just not displaying one of them, or is it only tall enough for one row?
Yes, I doubled the height (and just to try it out now tripled it) and the window's tall enough, they just don't show up.

Just for clarity's sake, I changed the 64 to 128 in this line:
Code:
self.width, self.height = commands.size * width + 32, 64
Ah, here.

Code:
def draw_item(i, color)
    self.contents.font.color = color
    w = (self.width - 32) / @column_max
    x = i % @column_max * w
    rect = Rect.new(x, 0, self.contents.width / @column_max, 32)
    self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
    self.contents.blt(x, 4, RPG::Cache.icon(@commands[i][0]),
          Rect.new(0, 0, 24, 24))
    self.contents.draw_text(rect, @commands[i][1], 1)
  end

Because it was originally intended to all be drawn on one row, the Y coordinate of the rect is hardcoded as 0. You'll have to change that to line_height * @column_max % [number of command you want on the first line]
Think you meant
Code:
i / @column_max * line_height
where 32 is generally the default value for line_height.
Edit: I get you now. Yeah, that's probably right.
Okay, so I changed the y to @KK20's snippet and that worked. But, the icons for the second row also appear on the first.
Screenshot for clarity:
1595320934466.png


EDIT: Okay, scratch that. I found it. Forgot every other y value (for the icon and the cursor) was also hardcoded. I changed it and now the icons are where they're supposed to be.

@Trihan and @KK20 Thanks for all the help! 😀
I was about to point that out but you seem to have caught it. Glad to be of assistance!
Thanks again. 😀 It's working perfectly.

Closing the thread now.

Original thread: https://forums.rpgmakerweb.com/threads/rmxp-ryes-collapsed-cms-extra-row.124292/