Hello,
I'm quite new to programming when it comes to JS-Plugins in RPG Maker MV, and I tried to write my own plugin.
In "rpg_windows.js" there is this function:
I made an alias-function of it and it works, it looks like this now:
Now I'd like to edit the "iconBoxWidth"-Variable from the original function, so it would perform a bit different in the alias-function. (I want to increase it by a specific number).
Is this even possible with alias-functions? If yes - how?
Greetings,
Kirimoar
I'm quite new to programming when it comes to JS-Plugins in RPG Maker MV, and I tried to write my own plugin.
In "rpg_windows.js" there is this function:
Code:
Window_Base.prototype.drawItemName = function(item, x, y, width) {
width = width || 312;
if (item) {
var iconBoxWidth = Window_Base._iconWidth + 4;
this.resetTextColor();
this.drawIcon(item.iconIndex, x + 2, y + 2);
this.drawText(item.name, x + iconBoxWidth, y, width - iconBoxWidth);
}
};
I made an alias-function of it and it works, it looks like this now:
Code:
var alias_Window_Base_drawItemName = Window_Base.prototype.drawItemName;
Window_Base.prototype.drawItemName = function(item, x, y, width) {
alias_Window_Base_drawItemName.call(this, item, x, y, width);
}
Now I'd like to edit the "iconBoxWidth"-Variable from the original function, so it would perform a bit different in the alias-function. (I want to increase it by a specific number).
Is this even possible with alias-functions? If yes - how?
Greetings,
Kirimoar