Ruth Studio

Veteran
Veteran
Joined
Oct 19, 2017
Messages
54
Reaction score
21
First Language
English
Primarily Uses
RMMV
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.


1632072372351.png
 

Arctica

Veteran
Veteran
Joined
Jul 19, 2021
Messages
84
Reaction score
108
First Language
English
Primarily Uses
RMMZ
Change the above to this:

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.
 

Ruth Studio

Veteran
Veteran
Joined
Oct 19, 2017
Messages
54
Reaction score
21
First Language
English
Primarily Uses
RMMV
Change the above to this:

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.

Looks like it put the code in the right direction, however it seems to be looping.
1632077385504.png
 

Arctica

Veteran
Veteran
Joined
Jul 19, 2021
Messages
84
Reaction score
108
First Language
English
Primarily Uses
RMMZ
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.
 

Latest Threads

Latest Posts

Latest Profile Posts

Redesigning characters after such a long time feels great. Makes me excited to work on an old game again.
Phone menu to replace main menu WIP:
It's been that long since I wrote a plugin, it took me 4 attempts to realize it's != rather than #. In a 40-line plugin, 20 of those lines being documentation!
Disk Check Plugin - Running on Linux:
RMMV-Game-Mint.png
workin on some graphics for my game. was originally planning on doing a cartoony style for the town but I might stick with this instead

Forum statistics

Threads
116,095
Messages
1,095,709
Members
151,469
Latest member
will-o-wistful
Top