ZephyrAM

Veteran
Veteran
Joined
Oct 6, 2017
Messages
75
Reaction score
75
First Language
English
Primarily Uses
RMMV
So this is driving me nuts.

I'm adding an image behind the name input window (so Window_NameEdit and Window_NameInput) and while it has mostly worked for me, it came up in front of the windows a few times, completely obscuring them, and it 'always' comes up in front for the windows for the guy I'm working with. I've added redundancies at this point that may not even be doing anything, but since I can't reproduce the issue to test, it's more difficult.

Any help would be fantastic! Modified code is below.

Edit:
Okay, so it's very possible he just needed to 'update' the plugin settings by using 'Ok' to get out and saving the game. -_-

Though I am still curious as to whether I handled this properly or not.

Sprite_NameImage.prototype = Object.create(Sprite.prototype); Sprite_NameImage.prototype.constructor = Sprite_NameImage; Sprite_NameImage.prototype.initialize = function (imageName) { Sprite.prototype.initialize.call(this); this.bitmap = ImageManager.loadPicture(imageName); this.x = (Graphics.boxWidth / 2) - 800; this.y = (Graphics.boxHeight / 2) - 450; }; ZAM.EntitledMiscFixes.Scene_Name_initialize = Scene_Name.prototype.initialize; Scene_Name.prototype.initialize = function() { ZAM.EntitledMiscFixes.Scene_Name_initialize.call(this); ImageManager.reservePicture('Name_Input'); }; Scene_Name.prototype.create = function() { Scene_MenuBase.prototype.create.call(this); this._actor = $gameActors.actor(this._actorId); $gameMap._interpreter.setWaitMode('image'); this.createImageWindow(); this.createEditWindow(); this.createInputWindow(); this.alterWindows(); console.log(this); }; Scene_Name.prototype.createImageWindow = function() { this._spriteActor = new Sprite_NameImage('Name_Input'); this.addChildAt(this._spriteActor, 1); }; Scene_Name.prototype.alterWindows = function() { this._editWindow.opacity = 0; this._inputWindow.opacity = 0; this._editWindow.x += nameEditX; this._inputWindow.x += nameInputX; this._editWindow.y += nameEditY; this._inputWindow.y += nameInputY; this._editWindow.contents.fontSize += nameEditSize; this._inputWindow.contents.fontSize += nameInputSize; }; // Remove face image Window_NameEdit.prototype.refresh = function() { this.contents.clear(); //this.drawActorFace(this._actor, 0, 0); for (var i = 0; i < this._maxLength; i++) { this.drawUnderline(i); } for (var j = 0; j < this._name.length; j++) { this.drawChar(j); } var rect = this.itemRect(this._index); this.setCursorRect(rect.x, rect.y, rect.width, rect.height); }; // Fix name input spacing Window_NameEdit.prototype.left = function() { var nameCenter = (this.contentsWidth() / 2); // + this.faceWidth()) / 2; var nameWidth = (this._maxLength + 1) * this.charWidth(); return Math.min(nameCenter - nameWidth / 2, this.contentsWidth() - nameWidth); };

~Zephyr
 
Last edited:

ShadowDragon

Realist
Veteran
Joined
Oct 8, 2018
Messages
4,520
Reaction score
1,737
First Language
Dutch
Primarily Uses
RMMV
personally, when you create a background, I should create a background
function, call this, and your good to go.

if you want a background image inside the window, it would be differently.
 

Latest Threads

Latest Profile Posts

unintentionally made a track that sounds straight out of Yume Nikki
Revisiting one of my older projects in a long time to work some more on the mechanics. I've been working on- and off-again for about a year now on recreating the Force and Mystic systems from Wild ARMs. And I think I've finally made some good breakthroughs on that!

Still, it is not perfect and I may post my thoughts at a later time to see if there are any other suggestions or alternatives I've missed.
actor name string, why you gotta be case sensitive like that?
Doing RPG Maker News for 26th October 2021

My entire world, full of monsters and treasures, will likely be done by the end of the year. After that it's all NPCs and side quests... then done. I'm never making an open world game again xD

Forum statistics

Threads
116,106
Messages
1,095,848
Members
151,505
Latest member
rensky
Top