Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #==============================================================================
- # ■ Save Scroll Arrow RGSS3 v1.1 MIT License; see git.io/tic
- #------------------------------------------------------------------------------
- # Show scrolling arrows on save and load screens.
- #==============================================================================
- class Window_SaveFileArrow < Window_Base
- #--------------------------------------------------------------------------
- # ● Object initialization
- #--------------------------------------------------------------------------
- def initialize(rect)
- super(rect.x, rect.y, rect.width, rect.height)
- self.opacity = 0
- end
- #--------------------------------------------------------------------------
- # ● Calculate width of window contents
- #--------------------------------------------------------------------------
- def contents_width
- return 1
- end
- #--------------------------------------------------------------------------
- # ● Calculate height of window contents
- #--------------------------------------------------------------------------
- def contents_height
- super + 2
- end
- end
- #------------------------------------------------------------------------------
- class Scene_File
- #--------------------------------------------------------------------------
- # ● Create save file viewport [alias]
- #--------------------------------------------------------------------------
- alias toruic_create_savefile_viewport create_savefile_viewport
- def create_savefile_viewport
- toruic_create_savefile_viewport
- @arrow_window = Window_SaveFileArrow.new(@savefile_viewport.rect)
- end
- #--------------------------------------------------------------------------
- # ● Setting the index at the beginning [alias]
- #--------------------------------------------------------------------------
- alias toruic_top_index= top_index=
- def top_index=(index)
- self.toruic_top_index = index
- return @arrow_window.oy = 0 if top_index == 0
- return @arrow_window.oy = 2 if bottom_index == item_max - 1
- return @arrow_window.oy = 1
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement