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
238
Reaction score
135
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
238
Reaction score
135
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,979
Reaction score
2,303
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
238
Reaction score
135
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,115
Reaction score
5,968
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 Posts

Latest Profile Posts

DavidUchina wrote on caethyril's profile.
You chad, thanks a lot for your plugins. You helped me costumize the buttons in my game.
I created the first teaser for my game! I decided to make an animation of Cabaret Helen advertising the Pizza Time Theater, set to an actual radio commercial. But this is no ordinary advertisement...
"Somber melody and stunning visuals takes one through the bittersweet tale of False Rebirth" ~ Marmalade
https://rpgmaker.net/games/12069/reviews/7576/

Got a first review on my game, on RPG Maker dot net. :kaothx:
Nightmare... Dreamt I posted a GFX resource post. With a work in progress glove icon that tinted to different colors. In the wrong forum. And I was in such a panic. I saw people writing posts in response, those "..." you see in discord and such. So I frantically tried to report my post as wrong forum, editing to say it's the wrong forum and that I "accidentally" posted it too early... Very odd dream to be honest...
The youngest photo of you is also the oldest photo of you.

Forum statistics

Threads
117,214
Messages
1,105,525
Members
153,357
Latest member
gabriel1777
Top