MV [Solved] Help with creating a grid of selectable icons / vertical spacing

Hello, I've been trying to learn Javascript through plugin making, but I'm feeling snagged on what I'm trying currently:
I want to create a grid of squares and have them all be highlightable/selectable in a menu scene. I see ways to make items for commands with text, but I'm unsure of how to go about creating items that are simply a selectable square.

Attached picture is what the menu currently looks like, I was wondering how to go about making that grid of squares selectable? (Right now the squares are just simply drawn in with contents.fillRect() in a Window_Selectable child(?) class.)

EDIT: Ok got to play with it more today, I was able to get the size of the selection boxes and horizontal spacing correct by overwriting the standardPadding, spacing, itemRect, maxCols, maxRows, and maxItems in my child(?) class. However, I'm still stuck having issues VERTICAL SPACING (example below). Hoping someone could give me pointers in the right direction on how to resolve this.

EDIT #2: Ok I figured it out. The key was to set the itemRect function so the height extends down to the start of the box under it, then overwrite the updateCursor() function to change the setCursorRect function to have the desired box height of the cursor selection. My method probably isn't optimal, like I said I'm super new to JS, but it worked for me.

Original thread: https://forums.rpgmakerweb.com/threads/solved-help-with-creating-a-grid-of-selectable-icons-vertical-spacing.137278/