Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #==============================================================================
- # * Custom Window Message Show Up
- # by dsiver144
- #==============================================================================
- class Window_Message
- #--------------------------------------------------------------------------
- # * alias method: update_placement
- #--------------------------------------------------------------------------
- alias_method(:dsiver_update_placement, :update_placement)
- def update_placement
- dsiver_update_placement()
- self.opacity = 0
- open_and_wait
- des_y = @position * (Graphics.height - height) / 2
- self.y = des_y + height
- contents.clear
- self.contents_opacity = 255
- while self.y > des_y
- self.y -= 10
- self.opacity += 20
- Fiber.yield
- end
- end
- #--------------------------------------------------------------------------
- # * alias method: close_and_wait
- #--------------------------------------------------------------------------
- alias_method(:dsiver_close_and_wait, :close_and_wait)
- def close_and_wait
- des_y = @position * (Graphics.height - height) / 2 + height
- while self.y < des_y
- self.y += 10
- self.opacity -= 20
- self.contents_opacity -= 20
- Fiber.yield
- end
- dsiver_close_and_wait
- end
- end # Window_Message
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement