Advertisement
skp-april

SKP-Core

Aug 24th, 2014
218
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.26 KB | None | 0 0
  1. $imported = {} if $imported.nil?
  2. $imported["SKP-Core"] = true
  3.  
  4. =begin
  5. This is my very first attempt at any form of scripting. I just pray that
  6. it doesnt break your game or your computer of your life, so please make
  7. a backup before importing any of my scripts.
  8.  
  9.  
  10. CREDITS
  11.  
  12. SKP-April
  13. Yanfly
  14. =end
  15.  
  16. module SKP
  17. module CORE
  18. RESIZE_WIDTH = 640
  19. RESIZE_HEIGHT = 416
  20.  
  21. GROUP_DIGITS = false
  22.  
  23. QUICK_SCROLLING = true
  24.  
  25. end #CORE
  26. end #SKP-Core
  27.  
  28. Graphics.resize_screen(SKP::CORE::RESIZE_WIDTH, SKP::CORE::RESIZE_HEIGHT)
  29.  
  30. class Numeric
  31. def group
  32. return self.to_s unless SKP::CORE::GROUP_DIGITS
  33. self.to_s.gsub(/(\d)(?=\d{3}+(?:\.|$))(\d{3}\..*)?/,'\1,\2')
  34. end
  35. end
  36.  
  37. class Window_Selectable < Window_Base
  38. if SKP::CORE::QUICK_SCROLLING
  39. def process_cursor_move
  40. return unless cursor_movable?
  41. last_index = @index
  42. cursor_down (Input.trigger?(:DOWN)) if Input.repeat?(:DOWN)
  43. cursor_up (Input.trigger?(:UP)) if Input.repeat?(:UP)
  44. cursor_right (Input.trigger?(:RIGHT)) if Input.repeat?(:RIGHT)
  45. cursor_left (Input.trigger?(:LEFT)) if Input.repeat?(:LEFT)
  46. cursor_pagedown if !handle?(:pagedown) && Input.repeat?(:R)
  47. cursor_pageup if !handle?(:pageup) && Input.repeat?(:L)
  48. Sound.play_cursor if @index != last_index
  49. end
  50. end
  51.  
  52. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement