Where is the isOpen() method?

Status
Not open for further replies.

GE_Peter

Veteran
Veteran
Joined
Dec 13, 2016
Messages
37
Reaction score
11
First Language
English
Primarily Uses
RMMV
In the main engine code, in Window_Base there is this method:

Window_Base.prototype.open = function() {
if (!this.isOpen()) {
this._opening = true;
}
this._closing = false;
};


I tried looking for the isOpen() method to see exactly what it was checking, but even a search of all .js files comes up with nothing. Does anyone know where isOpen() is defined?
 

TSR

The Northern Frog
Veteran
Joined
Nov 14, 2019
Messages
279
Reaction score
244
First Language
French
Primarily Uses
RMMV
it's a javascript default method. return true if the object window is open...
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
2,604
Reaction score
1,961
First Language
English
Primarily Uses
RMMV
It's not a javascript default method, but it is one of the functions of rpg_core.js:

Code:
/**
 * Returns true if the window is completely open (openness == 255).
 *
 * @method isOpen
 */
Window.prototype.isOpen = function() {
    return this._openness >= 255;
};
 

TSR

The Northern Frog
Veteran
Joined
Nov 14, 2019
Messages
279
Reaction score
244
First Language
French
Primarily Uses
RMMV
lol, so true! :guffaw:
Guess I need some rest... :headshake:
 

GE_Peter

Veteran
Veteran
Joined
Dec 13, 2016
Messages
37
Reaction score
11
First Language
English
Primarily Uses
RMMV
Aha, there it is in rpg_core! Not only that, it really helps with what I'm trying to do.

I googled JavaScript default and pixi.js functions, and thought I searched the rpg maker files properly. I even found a todo note to some dev called Ivan that was accidentally left in rpg_scenes.js, but not isOpen.

Anyway, that was poor global searching on my part, thanks a lot for your help!


*edit*
still failing at searches today... where the heck is the 'mark as solved' button?
 
Last edited:

Restart

Veteran
Veteran
Joined
Mar 15, 2019
Messages
523
Reaction score
415
First Language
English
Primarily Uses
RMMV
In the main engine code, in Window_Base there is this method:

Window_Base.prototype.open = function() {
if (!this.isOpen()) {
this._opening = true;
}
this._closing = false;
};


I tried looking for the isOpen() method to see exactly what it was checking, but even a search of all .js files comes up with nothing. Does anyone know where isOpen() is defined?
A neat trick for solving this in the future: use the chrome debugger and put a breakpoint just before the .isopen, then when it hits the breakpoint, advance step-by-step into the .isOpen function that gets called
 

GE_Peter

Veteran
Veteran
Joined
Dec 13, 2016
Messages
37
Reaction score
11
First Language
English
Primarily Uses
RMMV
Great tip, thanks!
 

slimmmeiske2

Little Red Riding Hood
Global Mod
Joined
Sep 6, 2012
Messages
7,867
Reaction score
5,240
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.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Day 9 of giveaways! 8 prizes today :D
He mad, but he cute :kaopride:

Our latest feature is an interview with... me?!

People4_2 (Capelet off and on) added!

Just beat the last of us 2 last night and starting jedi: fallen order right now, both use unreal engine & when I say i knew 80% of jedi's buttons right away because they were the same buttons as TLOU2 its ridiculous, even the same narrow hallway crawl and barely-made-it jump they do. Unreal Engine is just big budget RPG Maker the way they make games nearly identical at its core lol.

Forum statistics

Threads
106,040
Messages
1,018,470
Members
137,821
Latest member
Capterson
Top