MV Help with adding columns to a choice window

So I wanted to use the Himeworks Choice Display Mode plugin for my game, but I wanted it to show choices in a horizontal row, not in multiple rows. I see that there's a function in the script to do that but it was never finished by the developer. Currently when you change the number of columns in a row, all the choices appear mashed together with no space between them.
How can I edit the script so they show up with space between depending on the number of letters in the message, so they are not stacked on top of each other?
The original code:
/* TO DO. Currently only supports one option per row as defualt */
Window_ChoiceList.prototype.maxCols = function() {
return 1;
};
Code changed by me:
/* TO DO. Currently only supports one option per row as defualt */
Window_ChoiceList.prototype.maxCols = function() {
return 3;
};
How it appears in game after the change:
1749971865018.png
sometimes you need to refresh the plugin (right click => refresh)
and resave and playtest from start (not from save game).

if that doesn't work, it needs to be in another place too.

just choiceList might not work if there is also a Window_Message
that has to be changed as well.
Paste this as a new plugin with any name and put it below the plugin you already have.

Code:
Window_ChoiceList.prototype.maxCols = function () {
    return this.isHorizontal() ? this.maxItems() : 1;
}

Window_ChoiceList.prototype.windowHeight = function() {
    return this.isHorizontal() ? this.fittingHeight(1) : this.fittingHeight(this.maxItems());
}

Window_ChoiceList.prototype.isHorizontal = function() {
    return $gameSwitches.value(12);
}

Then replace the 12 with a new Switch ID that you can name something like "Horizontal ChoiceList". After that, you can toggle ON/OFF the Switch whenever you like.

I programmed this plugin blindly without looking at the other plugin's code but it should still work. If not, I'm sure we can improve it.
Paste this as a new plugin with any name and put it below the plugin you already have.

Code:
Window_ChoiceList.prototype.maxCols = function () {
    return this.isHorizontal() ? this.maxItems() : 1;
}

Window_ChoiceList.prototype.windowHeight = function() {
    return this.isHorizontal() ? this.fittingHeight(1) : this.fittingHeight(this.maxItems());
}

Window_ChoiceList.prototype.isHorizontal = function() {
    return $gameSwitches.value(12);
}

Then replace the 12 with a new Switch ID that you can name something like "Horizontal ChoiceList". After that, you can toggle ON/OFF the Switch whenever you like.

I programmed this plugin blindly without looking at the other plugin's code but it should still work. If not, I'm sure we can improve it.
Thanks for the help
Sadly the plugin doesn't work properly. It changes the placement a little bit but it's still scuffed.
1749977651477.png
I programmed this plugin blindly without looking at the other plugin's code but it should still work
Hime as wrapped it inside the IIFE, but I think, the update placement he use
also play a role into it, and not exactly sure.

I think I saw this question before, as there is also another plugin to set
choice horizontal with similar code.

Original thread: https://forums.rpgmakerweb.com/threads/help-with-adding-columns-to-a-choice-window.178333/