RPG Maker Forums

Hello. I'm trying to design my own custom menu and I'm not finding success in displaying a picture.

Partial code below:

Code:
var _Scene_Menu_create = Scene_Menu.prototype.create;
Scene_Menu.prototype.create = function() {
        _Scene_Menu_create.call(this);

        this.createMapWindow();
};
So within the aliased menu creation scene, I added the creation of a new window as defined below:

Code:
    Scene_Menu.prototype.createMapWindow = function() {
    this._mapWindow = new Window_Map(0, 0);
    this._mapWindow.y = Graphics.boxHeight - this._mapWindow.height;
    this.addWindow(this._mapWindow);
};
For Window_Map I basically copied the Window_Gold function along with the other functions it calls. I renamed accordingly.

Code:
Window_Map.prototype.currencyUnit = function (){
 //return TextManager.currencyUnit;

}
Note: I didn't adjust currencyUnit to a proper name yet. Since it was used to display the gold icon, I was just converting this part to show a picture instead (Could display different icons instead). I've tried various methods to try to display a picture (some of which I don't fully understand myself):
Code:
  //$gameScreen.showPicture(24, "Package2_8.png", 0, 5, 5, 100, 100, 120, 0);
    //return $gameScreen.showPicture(pictureId, name, origin, x, y, scaleX, scaleY, opacity, blendMode);
    //return ImageManager.loadMap;//TextManager.currencyUnit;
    // var sprite = new Sprite();
 //    sprite.bitmap =ImageManager.loadPicture("Package2_8");
 //    sprite.x=5;
 //    sprite.y=5;
// return this.drawIcon($dataWeapons[2].iconIndex, 5, 5); //Can display different icons!
 // return this.drawPicture("Package2_8", 5, 5);

For the drawPicture method, I tried including a copied version of its function:

Code:
  Window_Map.prototype.drawPicture = function(filename, x, y) {
    var bitmap = ImageManager.loadPicture(filename);
    this.contents.blt(bitmap, 0, 0, 200, 200, 5, 5);
  };
Is it possible for pictures to be displayed in a window? I was reading icons can only be displayed in a window. I think pictures can be too, but just checking.

Am I going about this completely wrong?
My first step is just trying to succeed with adding a window to my custom menu that displays at least one picture.
My next step would be getting the displayed picture to change depending on certain parameters, probably a variable.

Latest Threads

Latest Profile Posts

Day 9 of giveaways! 8 prizes today :D
He mad, but he cute :kaopride:

Our latest feature is an interview with... me?!

People4_2 (Capelet off and on) added!

Just beat the last of us 2 last night and starting jedi: fallen order right now, both use unreal engine & when I say i knew 80% of jedi's buttons right away because they were the same buttons as TLOU2 its ridiculous, even the same narrow hallway crawl and barely-made-it jump they do. Unreal Engine is just big budget RPG Maker the way they make games nearly identical at its core lol.

Forum statistics

Threads
106,040
Messages
1,018,476
Members
137,824
Latest member
dobratemporal
Top