check if a window is opening?

Hi guys,
I want to ask for a way to check if a window is opening (on Map scene)
for example to check whether Key Item window is opening or not?
Thanks = D
If a window is opening or if it is open?

Are you interested in only the key item window, or other windows as well? You might need to state which ones specifically, as they may be different (probably not, but just in case)
Code:
class Window_Base < Window
 def opening?
  return @opening
 end
end

drop that somewhere after Window_Base.
that variable is defined, by default, but not instanced for use outside of the class.
that should open it for use, read only.
access it by (window).opening?
Code:
class Window_Base < Window
 def opening?
  return @opening
 end
end

drop that somewhere after Window_Base.
that variable is defined, by default, but not instanced for use outside of the class.
that should open it for use, read only.
access it by (window).opening?

Thank you = D but what i want to know is, how can i access that (window) part.
For exampe in this case is KeyItem window.
I tried (Window_KeyItem).opening? and Window_KeyItem.opening? but both doesn't work
Thank you = D but what i want to know is, how can i access that (window) part.
For exampe in this case is KeyItem window.
I tried (Window_KeyItem).opening? and Window_KeyItem.opening? but both doesn't work
Thank you = D but what i want to know is, how can i access that (window) part.
For exampe in this case is KeyItem window.
I tried (Window_KeyItem).opening? and Window_KeyItem.opening? but both doesn't work

Does if @opening = false / true not work ?
somewhere in the code there should be a line:

@windowname = Window_KeyItem.new(param, param, .....)

use @windowname.opening?
somewhere in the code there should be a line:

@windowname = Window_KeyItem.new(param, param, .....)

use @windowname.opening?
Ah, thank you very much! It's perfect!

Original thread: https://forums.rpgmakerweb.com/threads/check-if-a-window-is-opening.108755/