- Joined
- Oct 17, 2020
- Messages
- 67
- Reaction score
- 13
- First Language
- português
- Primarily Uses
- RMVXA
I want to see if I can replace the window opening/closing effect with a fade in and out! Command windows fade in and out fine, but it breaks Scene_Menu completely hahaha
How would I fix Scene_Menu scene calling and various other windows to this change? (Since "open?" / "close?" would be basically useless, I think....) Or did I forget to fix something in Window_Base??
How would I fix Scene_Menu scene calling and various other windows to this change? (Since "open?" / "close?" would be basically useless, I think....) Or did I forget to fix something in Window_Base??
Code:
class Window_Base < Window
#--------------------------------------------------------------------------
# * Object Initialization - aliased
#--------------------------------------------------------------------------
alias :z2983_initialize :initialize
def initialize(x, y, width, height)
z2983_initialize(x, y, width, height)
self.openness = 255
self.contents_opacity = 0
self.opacity = 0
end
#--------------------------------------------------------------------------
# * Update Open Processing - overwrite
#--------------------------------------------------------------------------
def update_open
self.contents_opacity += 48
self.opacity += 48
@opening = false if self.opacity == 255
end
#--------------------------------------------------------------------------
# * Update Close Processing - overwrite
#--------------------------------------------------------------------------
def update_close
self.contents_opacity -= 48
self.opacity -= 48
@closing = false if self.opacity == 0
end
#--------------------------------------------------------------------------
# * Open Window - overwrite
#--------------------------------------------------------------------------
def open
@opening = true unless self.opacity == 255
@closing = false
self
end
#--------------------------------------------------------------------------
# * Close Window - overwrite
#--------------------------------------------------------------------------
def close
@closing = true unless self.opacity == 0
@opening = false
self
end
end


