Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #===============================================================================
- # Using the pagedown button on a selectable window when there are more items
- # than what can be displayed sometimes (most of the times, actually) will result
- # in an "over-scrolled" window with lotsa empty space left on the bottom.
- # This snippet prevents that from happening.
- # Also if the window can't be scrolled up/down anymore (or at all), and the
- # pageup/pagedown button is pressed, it will jump to the first/last item on the
- # list unless it's already there.
- # Put this at the top of your custom script list!
- # Made by: Sixth
- #===============================================================================
- class Window_Selectable < Window_Base
- def cursor_pagedown
- if top_row + page_row_max < row_max
- self.top_row += page_row_max
- self.top_row = [self.top_row,item_max - page_row_max].min
- select([@index + page_item_max, item_max - 1].min)
- elsif @index != item_max - 1
- select(item_max - 1)
- end
- end
- def cursor_pageup
- if top_row > 0
- self.top_row -= page_row_max
- select([@index - page_item_max, 0].max)
- elsif @index != 0
- select(0)
- end
- end
- end
- class Scene_Title < Scene_Base
- def update
- super
- end
- end
- #==============================================================================
- # !!END OF SCRIPT - OHH, NOES!!
- #==============================================================================
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement