Indie Dev

Hello Guest!. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, sell your games, upload content, as well as connect with other members through your own private inbox!

Drawing images into a window?

Drykul

Villager
Xy$
0.00
I feel like I'm just missing something and I'll have a slap my forehead and say "Duh!" moment, but I can't figure out for the life of me how to draw an image in a window similar to how icons and character faces in Window_MenuStatus... is there not a built in method for using blt to draw images from the picture folder into a window already?

Edit - I ended up writing my own little code snippet for it but I was still wondering if I was just missing something?

Code:
Window_Base.prototype.drawPicture = function(pictureName, x, y) {
    var bitmap = ImageManager.loadPicture(pictureName);
    var pw = bitmap.width;
    var ph = bitmap.height;
    var sx = 0;
    var sy = 0;
    this.contents.blt(bitmap, sx, sy, pw, ph, x, y);
};
 
Last edited:
Top