If I make a window or two directly in Scene_Map, I don't actually need to dispose of them (provided i'm not eliminating dispose_all_windows from Scene_Base). Is that correct?
Question about disposing windows.
● ARCHIVED · READ-ONLY
-
-
all depend of what you do with them but did you think if you not dispose them what this will do in a cutscene? they will surelly overlap on your cut scene +
when you will want to get rid of your window you will can't because you not have the dispose window
I suggest you to do this just in case you want to remove your window in the game
def initializeyour windowdispose if Game_Variable[1] == 300endor you put the dispose but you do this
def initializecontents.visible = falsecreate_window_visibilityenddef create_windowcontents.visible = true if Game_Variable[1] == 300elsecontents.visible = falseendin simple if you do the second until you have the game variable 1 = 300 the window will be visible but if you want to get rid of it you simply change the variable to a inferior number : 3 -
Thanks for reminding me about other things appearing on the screen, nio.
And I'd much rather hide a window than dispose of it. :)
(I'm making little popups similar to yanfly's gab.)
But what i'm really asking is,
Is it redundant to create a disposal method if dispose_all_windows exists?
(Am i supposed to do it anyway? or only for child windows?) -
hum naturally the dispose_all_windows is for general windows but you can use it for dispose your normal windows but I still prefer for myself to dispose my own window
-
dispose_all_windows by default is only called when a scene is terminated. So like Nio said to if you want to dispose a window while you are on that scene, you need to do it manually, otherwise if you want to hide it, then hide it.
Again no, you need to dispose your window manually if you want to dispose it within the same scene the window is created. Moreover you can't rely on that method, because that method dispose all window existence in the scene, and that's why it only called when a scene is going to terminated.Is it redundant to create a disposal method if dispose_all_windows exists?
Hopefully you know what I mean, and have a nice day =) -
If you save those windows inside Game_Map and by any chance they don't get removed by the dispose_all_windows you won't be able to save your game because you have bitmaps in there, and bitmaps cannot be serialized by Marshal..
-
Ah, I did not know that. ..that's reason enough for a noob like me. :blush:
'Better safe than sorry' it is. I appreciate the input guys. -
your welcome : D!