Ledger Nano X - The secure hardware wallet
SHARE
TWEET

Toru Higuruma - Save Scroll Arrow

neutale May 22nd, 2020 1,345 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #==============================================================================
  2. # ■ Save Scroll Arrow RGSS3 v1.1      MIT License; see git.io/tic
  3. #------------------------------------------------------------------------------
  4. #  Show scrolling arrows on save and load screens.
  5. #==============================================================================
  6.  
  7. class Window_SaveFileArrow < Window_Base
  8.   #--------------------------------------------------------------------------
  9.   # ● Object initialization
  10.   #--------------------------------------------------------------------------
  11.   def initialize(rect)
  12.     super(rect.x, rect.y, rect.width, rect.height)
  13.     self.opacity = 0
  14.   end
  15.   #--------------------------------------------------------------------------
  16.   # ● Calculate width of window contents
  17.   #--------------------------------------------------------------------------
  18.   def contents_width
  19.     return 1
  20.   end
  21.   #--------------------------------------------------------------------------
  22.   # ● Calculate height of window contents
  23.   #--------------------------------------------------------------------------
  24.   def contents_height
  25.     super + 2
  26.   end
  27. end
  28. #------------------------------------------------------------------------------
  29. class Scene_File
  30.   #--------------------------------------------------------------------------
  31.   # ● Create save file viewport [alias]
  32.   #--------------------------------------------------------------------------
  33.   alias toruic_create_savefile_viewport create_savefile_viewport
  34.   def create_savefile_viewport
  35.     toruic_create_savefile_viewport
  36.     @arrow_window = Window_SaveFileArrow.new(@savefile_viewport.rect)
  37.   end
  38.   #--------------------------------------------------------------------------
  39.   # ● Setting the index at the beginning [alias]
  40.   #--------------------------------------------------------------------------
  41.   alias toruic_top_index= top_index=
  42.   def top_index=(index)
  43.     self.toruic_top_index = index
  44.     return @arrow_window.oy = 0 if top_index == 0
  45.     return @arrow_window.oy = 2 if bottom_index == item_max - 1
  46.     return @arrow_window.oy = 1
  47.   end
  48. end
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top