Pie4aPie

Developer/Artist
Veteran
Joined
Jan 10, 2013
Messages
65
Reaction score
6
First Language
English
Hello,


I have been trying to figure out why I can't move the "pop-up" select-able window in the Item scene. Finding it in the scripts is easy enough and changing the y-axis parameter has an effect, but the window is stuck on the right side of the scene no matter what I do. I feel like I have exhausted my personal search, so if anyone here know how I can achieve this, please help.


Below is where I am looking in the code. This is in rpg_windows.js. The highlighted line is what I think should allow this, but the 0 i believe is the x-axis parameter and nothing changes when I adjust it. I can't help but feel that there is something else telling this window to be at "GraphicsBox.width - this.actionWindow.width" (or something similar).


codehelp.png


thanks,
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
42,847
Reaction score
14,984
First Language
English
Primarily Uses
RMMV
I haven't tested this, but try going into rpg_scenes.js and find Scene_ItemBase.prototype.createActorWindow, and put this._actorWindow.x = whatever you want, after the window has been created.
 

Ahuramazda

Veteran
Veteran
Joined
Nov 9, 2012
Messages
262
Reaction score
130
First Language
English
Primarily Uses
RMMZ
When I edited the actor window in my game I changed this section of code.


Scene_ItemBase.prototype.showSubWindow = function(window) {
window.x = ( Graphics.width - window.width ) / 2 // EDIT: this.isCursorLeft() ? Graphics.boxWidth - window.width : 0;
window.y = (Graphics.height - window.height) / 2 // EDIT: added in
window.show();
window.activate();
};


and in the end this is my menu setup from all the changes. I hated how it looked with the larger resolution I was using, so I tweaked everything to pack in a lot better :D   At least using the above changes you can easily move your box around.

Untitled-1.png
 
Last edited by a moderator:

Pie4aPie

Developer/Artist
Veteran
Joined
Jan 10, 2013
Messages
65
Reaction score
6
First Language
English
Thank you both so much for responding. I tried your idea Shaz. It makes logical sense because it appears to be the same window as what gets used on the main menu, and it definitely shares "simpleStatus" or whatever your custom layout might be. That x parameter did not let my move the pop-up.


Ahuramazda, that did the trick. Worked like a charm. I would have never considered looking for "SubWindow". I was starting from the command handler and working backwards trying to identify the window by the action that opens it. Didn't even look in Scene_ItemBase. This solves something I spent about 4 hours trying to figure out in a matter of seconds. Figuring it out on my own is half the fun though.


Thanks to you both again!!!
 

Ahuramazda

Veteran
Veteran
Joined
Nov 9, 2012
Messages
262
Reaction score
130
First Language
English
Primarily Uses
RMMZ
Yeah, it took me forever to figure out it was controlled by the sub window, and since I knew exactly what you were talking about I shared my research :D   lol


I know the pain of trial and error as I spent about 4-5 hours myself trying to find and move certain windows, and I still think that is the best method of learning code if you want it to really stick.
 

Latest Threads

Latest Posts

Latest Profile Posts

Chili: Evolved to taste spicy so no animal would eat them.

Humans: "Jokes on you ..."
I guess it becomes purely academic in less than four days but before then can anyone explain to me why the %^&*( animations in the MZ database don't have a 'Hue' slider??
Who here knows of the hidden laws of this multiverse? Such as the law of attraction
Exploding Fruits and Rasaks Pixelfarm Assets | RPG Maker News #108

So ghosts can go through walls and stuff, and depending their type (according to fantasy media) they can or can't interact with objects to a certain degree...

So why they don't always fall through floors? Do they always float and sometimes simulate walking? If things go through them how can they hear/see? And why sometimes they have clothing? Do clothes die as well?

Forum statistics

Threads
113,705
Messages
1,076,800
Members
147,728
Latest member
Alteria
Top