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,425
Reaction score
1,685
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 Posts

Latest Profile Posts

 I’m probably going to regret this, but I need kobolds for my project and I’ve decided to sprite them myself. This is Attempt #1, front view only.

KoboldFront.gif
It's a shame that Selection Control will not be ported to MZ. I found a neat way of using it to enable ways for tanks to protect squishies. lol
Lately I have been taking a break from game and resource making so I won't get burnt out. But I am also interested in the Game Jams this site periodically holds. It'd be great if I knew when the next one, if any, is planned.
elexy 1.2.pngSome bust art to be cropped and cleaned. May use in special decision moments. Depending on how it looks in game I may cut it.
Tiamat-86 wrote on ATT_Turan's profile.
apparently since its turning 15 years old this year the ps3 is considered "retro". now how old do you feel?
guess that means im an "antique" gamer since ill still play games as old as i am.
"you know your getting old when your childhood console changes ethnicity" lol it turned yellow

Forum statistics

Threads
115,353
Messages
1,089,208
Members
150,029
Latest member
Cwiras
Top