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
217
Reaction score
114
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
217
Reaction score
114
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,291
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
217
Reaction score
114
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

Sizzle sizzle sizzle...
zbf1dCZ.gif
Sharing my past was a mistake. Will delete the post when I get access to a working internet connection again.
TFW you get a plugin working correctly with your other plugins ♡\( ̄▽ ̄)/♡

(CW for minor gore - Einar's Y incision is gone for his test portrait)

Cs5kAbZ.png
Doing some winter related edits for a cozy cottage!
I think it's the third time I am changing my skill info plugin, but as I get better at programming, I want to fix the trash I made earlier :p

Streaming while I am programming the plugin. Join in if you wish :)

Forum statistics

Threads
116,981
Messages
1,103,496
Members
152,845
Latest member
Zynarith2
Top