RMMV Adding a Window from Scene A to Scene B? (SOLVED)

Status
Not open for further replies.

bishiba

Adept
Veteran
Joined
Apr 6, 2016
Messages
278
Reaction score
163
First Language
Swedish
Primarily Uses
N/A
As the title reads, I have made a Window for Scene A that I also want to use in Scene B. And I don't think it'd be efficient to have two separate window functions rather than having one functino that both scenes can call. How could this be done? :)

Any suggestions or tips would be greatly appreciated! :)

Best regards,
Bishiba
 

HiddenAlchemist

Veteran
Veteran
Joined
Jan 6, 2021
Messages
131
Reaction score
186
First Language
English
Primarily Uses
RMMV
I don't quite understand what it is you're asking. Are you asking how to change the windowskin graphic for different situations?

You would have to use a plugin for that. Galv's Message Styles can help with that.
 

bishiba

Adept
Veteran
Joined
Apr 6, 2016
Messages
278
Reaction score
163
First Language
Swedish
Primarily Uses
N/A
I don't quite understand what it is you're asking. Are you asking how to change the windowskin graphic for different situations?

You would have to use a plugin for that. Galv's Message Styles can help with that.
Sorry if I am being unclear :( I have been in front of my screen from morning and been in front of code all day. Brain is a bit mushy...

No, it's not about the graphics. I want the below Window to be used by another Scene. The exact same Window. And I want to clarify that the below Window is one of 10 or so that I want to use in another Scene.
JavaScript:
Window_ShopStatus.prototype.drawActorData = function() { //Draws the amount of status rectangles
    this.drawActorDisplayed(this._actor);
    this.drawDarkRectEntries(this._totalItemsParams);
    this.drawActorStatInfo(this._actor);
};

Edit:
After thinking about it for a bit, I guess I could do it like this:
JavaScript:
Scene_Equip.prototype.createStatusWindow = function() {
    this._statusWindow = new Window_ShopStatus(0, this._helpWindow.height);
    this.addWindow(this._statusWindow);
};
Then I can just change the name of the window to Window_GenStatus :/

Unless there is a better way.
 
Last edited:

caethyril

^_^
Global Mod
Joined
Feb 21, 2018
Messages
4,510
Reaction score
3,551
First Language
EN
Primarily Uses
RMMZ
Window classes, e.g. Window_Base, are meant to be used to create new instances.
Window instances, e.g. new Window_Base(), are typically not shared between scenes.

I'm guessing this relates to your other recent thread here:
 

bishiba

Adept
Veteran
Joined
Apr 6, 2016
Messages
278
Reaction score
163
First Language
Swedish
Primarily Uses
N/A
Window classes, e.g. Window_Base, are meant to be used to create new instances.
Window instances, e.g. new Window_Base(), are typically not shared between scenes.

I'm guessing this relates to your other recent thread here:
Well it is highly related, but this question is a bit more stand alone as it was regarding reusing an entire scenes windows in another scene. I actually forgot about this one as I forgot to set it to being watched. Thought no answers had come. But I also realized quite quickly that it just uses a constructor. I think I was just waaay to tired tbh when asking this question :p
 

slimmmeiske2

Little Red Riding Hood
Global Mod
Joined
Sep 6, 2012
Messages
10,116
Reaction score
6,399
First Language
Dutch
Primarily Uses
RMXP

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

 
Status
Not open for further replies.

Latest Threads

Latest Profile Posts

Time to wrap things up and release a demo of my game.
My son is smelling the house out with waffles and homemade strawberry sauce. Sometimes he has leftovers. I hope he has leftovers today!
I really, really, REALLY hate it when I'm trying to make an event work but I keep screwing it up and somehow mess up the conditional branches and can't figure out the proper order!:kaolivid:
I got a function working to load the last save after a game over. Really proud of myself.
Still a WIP...

car.png
I started the evening loving vintage cars... by the time I am done however I might not anymore... xD

Forum statistics

Threads
130,002
Messages
1,206,940
Members
171,252
Latest member
Liuyu
Top