- Joined
- May 28, 2016
- Messages
- 3
- Reaction score
- 4
- First Language
- French
- Primarily Uses
Hey! I am developing a plugin for my project that displays a screen of where the player is saving.
Depending on the screen resolution, I need to enlarge or shrink this image.
The reduction is done without any problem with the code below. On the other hand, as soon as I try to enlarge, even by 1%, the image is not displayed.
Anyone know why?
Thanks for your help !
Depending on the screen resolution, I need to enlarge or shrink this image.
The reduction is done without any problem with the code below. On the other hand, as soon as I try to enlarge, even by 1%, the image is not displayed.
Anyone know why?
JavaScript:
Window_SaveInfo.prototype.updateCountdown = function() {
if (this._countdown > 0) {
this._countdown -= 1;
if (this._countdown <= 0) this.refreshPic();
}
};
Window_SaveInfo.prototype.refreshPic = function() {
if (this._countdown > 0) return;
var id = this.savefileId();
this.drawPicture("Save" + id, 0, 370);
};
Window_SaveInfo.prototype.drawPicture = function(pictureName, x, y) {
var bitmap = ImageManager.loadPicture(pictureName);
var testx = (1640 / bitmap.width);
var testy = (496 / bitmap.height);
var pw = (testx * bitmap.width);
var ph = (testy * bitmap.height);
var sx = 0;
var sy = 0;
this.contents.blt(bitmap, sx, sy, pw, ph, x, y);
if (bitmap.width <= 0 && this._countdown <= 0) {
this._countdown = 5;
this.refreshPic();
}
};

