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
219
Reaction score
118
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
72
Reaction score
80
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
219
Reaction score
118
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,957
Reaction score
2,292
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
219
Reaction score
118
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,112
Reaction score
5,963
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

I'm listening to iiluminaughtii talking about the secrets behind shady businesses and scams. Meanwhile I'm writing a fanfic about Sephiroth from FF7, one specifically for my stepmom. I'll get to give it to her, too, because my boss said I could take the holidays off! Dec. 22-27 I will be in Orlando, and maybe Fort Myers too, visiting my dad and stepmom!
Of course, I bought a handful of games on the Steam Black Friday sale. Will I try them? Will I complete any? Who knows...
I don't really have any neat updates today about how I screwed up programming... But if you want to observe the intensenes of me programming, then you can check out my stream :)
New Weapons.gif
No more spam from me today, I promise! Just wanted to upload this, people have been giving me feedback that my weapon sprites (which were RTP) clashed badly with my battlers for ages, so today I finally took the plunge and updated them! Really happy with how they came out :D :D
So Facebook fraudulently took money from me. They even went through my PayPal accounts to find a card that had the money on it. Thinking about deleting my Facebook account because this doesn't happen on twitter, not even close.

Forum statistics

Threads
117,006
Messages
1,103,770
Members
152,902
Latest member
varghn
Top