I'm trying to use custom backgrounds for the load scene.
I managed to have the save screen show custom picture as background, but now I don't know how to show the same background when I try to load files.
From the title screen, when I choose to load, the title background picture gets blurred and lists of save files appear on the blurred titlescreen.
I'm using Rito's plug-in for backgrounds and other plug-ins by Yanfly and SRD, but I'm willing to use other plug-ins in order to fix this. (except SRD's because I once used it and a black screen kept coming up every time I show menu)
How's everybody making awesome menu/save/load/item backgrounds?
I've made some changes to my window.js file to make my save screen neat, so I'm adding the savefile list part below, just in case.
I managed to have the save screen show custom picture as background, but now I don't know how to show the same background when I try to load files.
From the title screen, when I choose to load, the title background picture gets blurred and lists of save files appear on the blurred titlescreen.
I'm using Rito's plug-in for backgrounds and other plug-ins by Yanfly and SRD, but I'm willing to use other plug-ins in order to fix this. (except SRD's because I once used it and a black screen kept coming up every time I show menu)
How's everybody making awesome menu/save/load/item backgrounds?
I've made some changes to my window.js file to make my save screen neat, so I'm adding the savefile list part below, just in case.
// Window_SavefileList
//
// The window for selecting a save file on the save and load screens.
function Window_SavefileList() {
this.initialize.apply(this, arguments);
}
Window_SavefileList.prototype = Object.create(Window_Selectable.prototype);
Window_SavefileList.prototype.constructor = Window_SavefileList;
Window_SavefileList.prototype.initialize = function(x, y, width, height) {
Window_Selectable.prototype.initialize.call(this, x, y, width, height - 59);
this.activate();
this._mode = null;
};
Window_SavefileList.prototype.setMode = function(mode) {
this._mode = mode;
};
Window_SavefileList.prototype.maxItems = function() {
return DataManager.maxSavefiles();
};
Window_SavefileList.prototype.maxVisibleItems = function() {
return 3;
};
Window_SavefileList.prototype.itemHeight = function() {
var innerHeight = this.height - this.padding * 2;
return Math.floor(innerHeight / this.maxVisibleItems());
};
Window_SavefileList.prototype.drawItem = function(index) {
var id = index + 1;
var valid = DataManager.isThisGameFile(id);
var info = DataManager.loadSavefileInfo(id);
var rect = this.itemRectForText(index);
this.resetTextColor();
if (this._mode === 'load') {
this.changePaintOpacity(valid);
}
this.drawFileId(id, rect.x + 150, rect.y + 80);
if (info) {
this.changePaintOpacity(valid);
this.drawContents(info, rect, valid);
this.changePaintOpacity(true);
}
};
Window_SavefileList.prototype.drawFileId = function(id, x, y) {
this.drawText(id, x + 1000, y - 55, 180);
};
Window_SavefileList.prototype.drawContents = function(info, rect, valid) {
var bottom = rect.y + rect.height;
if (rect.width >= 420) {
this.drawGameTitle(info, rect.x + 192, rect.y, rect.width);
if (valid) {
this.drawPartyCharacters(info, rect.x + 185, bottom - 16);
}
}
var lineHeight = this.lineHeight();
var y2 = bottom - lineHeight;
if (y2 >= lineHeight) {
this.drawPlaytime(info, rect.x, y2 - 155, rect.width);
}
};
Window_SavefileList.prototype.drawGameTitle = function(info, x, y, width) {
if (info.title) {
this.drawText(info.title, x, y, width);
}
};
Window_SavefileList.prototype.drawPartyCharacters = function(info, x, y) {
if (info.characters) {
for (var i = 0; i < info.characters.length; i++) {
var data = info.characters;
this.drawCharacter(data[0], data[1], x + i * 48, y);
}
}
};
Window_SavefileList.prototype.drawPlaytime = function(info, x, y, width) {
if (info.playtime) {
this.drawText(info.playtime, x - 170, y + 95, width, 'right');
}
};
Window_SavefileList.prototype.playOkSound = function() {
};
//-----------------------------------------------------------------------------
// Window_ShopCommand
//
// The window for selecting buy/sell on the shop screen.
function Window_ShopCommand() {
this.initialize.apply(this, arguments);
}
Window_ShopCommand.prototype = Object.create(Window_HorzCommand.prototype);
Window_ShopCommand.prototype.constructor = Window_ShopCommand;
Window_ShopCommand.prototype.initialize = function(width, purchaseOnly) {
this._windowWidth = width;
this._purchaseOnly = purchaseOnly;
Window_HorzCommand.prototype.initialize.call(this, 0, 0);
};
Window_ShopCommand.prototype.windowWidth = function() {
return this._windowWidth;
};
Window_ShopCommand.prototype.maxCols = function() {
return 3;
};
Window_ShopCommand.prototype.makeCommandList = function() {
this.addCommand(TextManager.buy, 'buy');
this.addCommand(TextManager.sell, 'sell', !this._purchaseOnly);
this.addCommand(TextManager.cancel, 'cancel');
};
//
// The window for selecting a save file on the save and load screens.
function Window_SavefileList() {
this.initialize.apply(this, arguments);
}
Window_SavefileList.prototype = Object.create(Window_Selectable.prototype);
Window_SavefileList.prototype.constructor = Window_SavefileList;
Window_SavefileList.prototype.initialize = function(x, y, width, height) {
Window_Selectable.prototype.initialize.call(this, x, y, width, height - 59);
this.activate();
this._mode = null;
};
Window_SavefileList.prototype.setMode = function(mode) {
this._mode = mode;
};
Window_SavefileList.prototype.maxItems = function() {
return DataManager.maxSavefiles();
};
Window_SavefileList.prototype.maxVisibleItems = function() {
return 3;
};
Window_SavefileList.prototype.itemHeight = function() {
var innerHeight = this.height - this.padding * 2;
return Math.floor(innerHeight / this.maxVisibleItems());
};
Window_SavefileList.prototype.drawItem = function(index) {
var id = index + 1;
var valid = DataManager.isThisGameFile(id);
var info = DataManager.loadSavefileInfo(id);
var rect = this.itemRectForText(index);
this.resetTextColor();
if (this._mode === 'load') {
this.changePaintOpacity(valid);
}
this.drawFileId(id, rect.x + 150, rect.y + 80);
if (info) {
this.changePaintOpacity(valid);
this.drawContents(info, rect, valid);
this.changePaintOpacity(true);
}
};
Window_SavefileList.prototype.drawFileId = function(id, x, y) {
this.drawText(id, x + 1000, y - 55, 180);
};
Window_SavefileList.prototype.drawContents = function(info, rect, valid) {
var bottom = rect.y + rect.height;
if (rect.width >= 420) {
this.drawGameTitle(info, rect.x + 192, rect.y, rect.width);
if (valid) {
this.drawPartyCharacters(info, rect.x + 185, bottom - 16);
}
}
var lineHeight = this.lineHeight();
var y2 = bottom - lineHeight;
if (y2 >= lineHeight) {
this.drawPlaytime(info, rect.x, y2 - 155, rect.width);
}
};
Window_SavefileList.prototype.drawGameTitle = function(info, x, y, width) {
if (info.title) {
this.drawText(info.title, x, y, width);
}
};
Window_SavefileList.prototype.drawPartyCharacters = function(info, x, y) {
if (info.characters) {
for (var i = 0; i < info.characters.length; i++) {
var data = info.characters;
this.drawCharacter(data[0], data[1], x + i * 48, y);
}
}
};
Window_SavefileList.prototype.drawPlaytime = function(info, x, y, width) {
if (info.playtime) {
this.drawText(info.playtime, x - 170, y + 95, width, 'right');
}
};
Window_SavefileList.prototype.playOkSound = function() {
};
//-----------------------------------------------------------------------------
// Window_ShopCommand
//
// The window for selecting buy/sell on the shop screen.
function Window_ShopCommand() {
this.initialize.apply(this, arguments);
}
Window_ShopCommand.prototype = Object.create(Window_HorzCommand.prototype);
Window_ShopCommand.prototype.constructor = Window_ShopCommand;
Window_ShopCommand.prototype.initialize = function(width, purchaseOnly) {
this._windowWidth = width;
this._purchaseOnly = purchaseOnly;
Window_HorzCommand.prototype.initialize.call(this, 0, 0);
};
Window_ShopCommand.prototype.windowWidth = function() {
return this._windowWidth;
};
Window_ShopCommand.prototype.maxCols = function() {
return 3;
};
Window_ShopCommand.prototype.makeCommandList = function() {
this.addCommand(TextManager.buy, 'buy');
this.addCommand(TextManager.sell, 'sell', !this._purchaseOnly);
this.addCommand(TextManager.cancel, 'cancel');
};