Need help making a "fake window"

Does someone know how the Window_Base does the drawing of the window using the Window.png picture?
I would like to reproduce that without creating an actual window so I can draw something in the map that looks exactly the same as any other game window but that will behave in a different way
Check out this thread, it's about the same issue.


Additionally I'm moving this thread since it's less about javascript and more about how the engine works in general.

I've moved this thread to RPG Maker MV. Thank you.

Check out this thread, it's about the same issue.


Additionally I'm moving this thread since it's less about javascript and more about how the engine works in general.

Moved to: RPG Maker MV
this isn't exactly what I was asking.

I'm asking what functions related to the Window_Base function, responsible for creating windows, are responsible for the drawing of it? And, if its not asking much, how the drawing of it works(like how does it loads a file, probably splits it into many parts, and slowly "put them together" in such way)?

What I'm trying to mimic is the drawing done by said function, not how to drawing of a window.png file
I don't get it what you are looking for but I'm gonna try to answer your question. But before that, just saying that I am brazilian too so if you want a better explanation (in portuguese) just message me!

So, to start... in RPG Maker, the Window settings are controlled by three elements, two of them are codes and another one is art:

Rpg_windows.js: is the superclass of all the windows in the game (responsible to set some classes and objects that will further be used by rpg_scenes.

Rpg_scenes.js: is the superclass of all the scenes in the game (relates to the rpg_windows.js because it's through him that this one sets the building of a scene - the boxes for instance).

Window.png: consider it the "skin" which rpg_windows searches through and the "wallpaper" that rpg_scenes uses to "color" the boxes itself draws.

What I'm trying to mimic is the drawing done by said function, not how to drawing of a window.png file

I get that you are looking for the "code aspect" of the thing. In such, I recommend you to read both: rpg_windows.js and rpg_scenes.js.

EDIT: Oh yeah, about the topic theme! I think you would be better by working with some Custom Menus Plugins such as Yanfly's Common Event Menu (it is easier to create a new interactive window with this).
What I'm trying to mimic is the drawing done by said function, not how to drawing of a window.png file
Basically...... you just want to make and show a blank Window.

If you just want a blank window that does nothing and displays nothing at all, that's easy enough. The "hard" stuff only comes when you actually want the Window to do something or display something. That's when you're basically asking for a custom menu or interface. The proper syntax for calling a blank window is "new Window_Base(x, y, width, height)".

Example usage:
JavaScript:
blankwindow = new Window_Base(0, 0, 100, 50)
SceneManager._scene.addWindow(blankwindow)
// Makes a new Window, positioned 0 pixels from the top of the screen, 0 pixels from the left, 100 pixels wide, 50 pixels tall.
// Stores it in a variable called "blankwindow", you can name it anything you want, you just need to put it in one so you can access it later to remove it.
// Attaches the Window in "blankwindow" onto the current Scene to display it.
This can be done in a Script Call. If you want to close or hide it, you can call hide() or close() on the window. Example usage:
JavaScript:
blankwindow.close()
All Windows are attached to a Scene.

The New Game/Continue Window (Window_TitleCommand) is attached to Scene_Title. The message box window Window_Message is attached to Scene_Map (and Scene_Battle, when it's used in battle). The party menu windows like Window_MenuCommand and Window_Status are attached to Scene_Menu. Etcetera, etc. These windows are all removed/reloaded when the Scene changes. So after you use Window_Base to make your blank window, you need to attach it to the current Scene, which you can access using SceneManager. If you then switch scenes (from Map into Battle or Map into Menu, etc.) it will automatically be removed and you'll need to run the Script Call to generate it again.

All the functions and code regarding Scenes and Windows can be seen in the .js files "rpg_windows.js", "rpg_scenes.js" and "rpg_core.js".
I'm asking what functions related to the Window_Base function, responsible for creating windows, are responsible for the drawing of it? And, if its not asking much, how the drawing of it works(like how does it loads a file, probably splits it into many parts, and slowly "put them together" in such way)?
Most of the code for visually putting together the window isn't in Window_Base. It's in the parent, Window, whose code you can see in "rpg_core.js".

So the shortest, most direct answer would be the "initialize" function is the one responsible for "creating" the window, since the drawing is actually done when Window_Base loads the code from its parent, Window which happens right when it gets initialized ("new Window_Base").

EDIT: Accidentally double posted, feel free to merge into the previous.

Original thread: https://forums.rpgmakerweb.com/threads/need-help-making-a-fake-window.117918/