Ruth Studio

Veteran
Veteran
Joined
Oct 19, 2017
Messages
61
Reaction score
24
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
186
Reaction score
302
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
61
Reaction score
24
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
186
Reaction score
302
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

Only 3 more days to get your copy of Move That Box! with -15% discount!
1660090657213.png
Mistakes will be made.
After three years, it was awesome to be back at Gen Con!
Words of Wisdom: You can be honest and alone. Or dishonest and together.
Working on mapping using RPGTools to create parallax maps using PVgames tiles/assets. It's super cool... but mapping is still something I drag my feet on getting done. I hate this but love the math parts of design, which is the opposite of a lot of dev's around, I think. It really do be different strokes for different folks.

Forum statistics

Threads
124,381
Messages
1,163,229
Members
163,180
Latest member
Viking
Top