- Joined
- Jul 18, 2014
- Messages
- 222
- Reaction score
- 13
- First Language
- English
- Primarily Uses
- RMMV
Hello. I'm trying to design my own custom menu and I'm not finding success in displaying a picture.
Partial code below:
So within the aliased menu creation scene, I added the creation of a new window as defined below:
For Window_Map I basically copied the Window_Gold function along with the other functions it calls. I renamed accordingly.
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):
For the drawPicture method, I tried including a copied version of its function:
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.
Partial code below:
Code:
var _Scene_Menu_create = Scene_Menu.prototype.create;
Scene_Menu.prototype.create = function() {
_Scene_Menu_create.call(this);
this.createMapWindow();
};
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);
};
Code:
Window_Map.prototype.currencyUnit = function (){
//return TextManager.currencyUnit;
}
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);
};
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.

