- Joined
- Oct 11, 2015
- Messages
- 427
- Reaction score
- 174
- First Language
- Dutch
- Primarily Uses
- RMMV
I have this code in a window:
this.drawActorFace(actor, 0, 0, 144, 144); // no image is drawn. This method is from Window_Base.Of course no image is drawn because, Javascript loads them asynchronously in the RM code further down the road (in the ImageManager).
So basically, I need to somehow call the this.refresh() again after the image is loaded, or better, not call refresh until it's loaded. How do I hook into that? Is there a method that is called when the bitmap finishes loading or something? Because I rather not loop the refresh or something else checking every frame if a face-bitmap finished loading.
I took a look at how Window_MenuStatus did it but couldn't find it. Because they must have had that same problem and solved it somehow. But how?
this.drawActorFace(actor, 0, 0, 144, 144); // no image is drawn. This method is from Window_Base.Of course no image is drawn because, Javascript loads them asynchronously in the RM code further down the road (in the ImageManager).
So basically, I need to somehow call the this.refresh() again after the image is loaded, or better, not call refresh until it's loaded. How do I hook into that? Is there a method that is called when the bitmap finishes loading or something? Because I rather not loop the refresh or something else checking every frame if a face-bitmap finished loading.
I took a look at how Window_MenuStatus did it but couldn't find it. Because they must have had that same problem and solved it somehow. But how?
Last edited by a moderator: