I've created an additional window in a custom menu and I'm able to display values from variables.
However, I can't figure out how to display them along with icons without any error.
The function below gives me the icon appearing behind "undefined" text, so it visually appears as:
"[icon]defined Player Score: "
*un appearing above the icon
What am I doing wrong? I also don't understand how to interpret the x and y values for the blt function. I just placed 1 for now.
However, I can't figure out how to display them along with icons without any error.
The function below gives me the icon appearing behind "undefined" text, so it visually appears as:
"[icon]defined Player Score: "
*un appearing above the icon
Code:
Window_New.prototype.iconPlayerScore = function() {
var bitmap = ImageManager.loadSystem('IconSet');
var pw = 32; //Window_Base._iconWidth;
var ph = 32; //Window_Base._iconHeight;
var sx = 87 % 16 * pw;
var sy = Math.floor(87 / 16) * ph;
return this.contents.blt(bitmap, sx, sy, pw, ph, 1, 1); //x, y
};
What am I doing wrong? I also don't understand how to interpret the x and y values for the blt function. I just placed 1 for now.