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
239
Reaction score
136
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
73
Reaction score
81
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
239
Reaction score
136
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
2,984
Reaction score
2,304
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
239
Reaction score
136
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
9,116
Reaction score
5,970
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

My new 49" monitor has been dispatched from the warehouse. Will it arrive tomorrow? The day after? I love that we can track packages now, even if it does only tell me when it's left that end and when it's arrived at the local centre. As long as it doesn't end up in Melbourne again, which has happened before ...
My friend's doing a surprise stream of my game Origin Hunt on Twitch here ! Feel free to stop by :yhappy:
Me, designing it a long time ago: Having an optional boss fight as a random chance to trigger when you fish in a certain spot with a certain type of bait is fun! Cool idea!
Me, trying to playtest everything again: oh god just let me see the boss, my bag is so full of fish!
both love and pain have no boundaries

Forum statistics

Threads
117,229
Messages
1,105,689
Members
153,386
Latest member
fredflol
Top