Not sure what I am missing. I am able to get the window to add to the screen, however, I am unable to add the text to the window that is being populated. That sure what I am missing.
MV Adding Text to Window
Learning JavascriptChange the above to this:
And for your initializer:
Without the "()" it will just return the function definition.
JavaScript:
Window_PM.prototype.refresh = function() {
this.contents.clear();
this.drawText(text);
};
And for your initializer:
JavaScript:
this.refresh()
Without the "()" it will just return the function definition.
You'll need to change the name(the function identifier) of your drawText method, so it's not the same as the drawText call in the function body of that method, then change the name of the call in your refresh method to that of your method with the new name.
Original thread: https://forums.rpgmakerweb.com/threads/adding-text-to-window.140593/