Advertisement
Black_Mage

Credits Window RMVXAce Script

Mar 4th, 2014
539
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.00 KB | None | 0 0
  1. #==============================================================================
  2. # ** Window_Credits by Black Mage (Credit required to use)
  3. # https://burningwizard.wordpress.com/2014/03/04/rgss3-credits-script/
  4. #==============================================================================
  5. class Window_TitleCommand < Window_Command
  6. def make_command_list
  7. add_command(Vocab::new_game, :new_game)
  8. add_command(Vocab::continue, :continue, continue_enabled)
  9. add_command("Credits", :credits)
  10. add_command(Vocab::shutdown, :shutdown)
  11. end
  12. end
  13.  
  14. class Scene_Title < Scene_Base
  15. def create_command_window
  16. @command_window = Window_TitleCommand.new
  17. @command_window.set_handler(:new_game, method(:command_new_game))
  18. @command_window.set_handler(:continue, method(:command_continue))
  19. @command_window.set_handler(:credits, method(:command_credits))
  20. @command_window.set_handler(:shutdown, method(:command_shutdown))
  21. end
  22. #--------------------------------------------------------------------------
  23. # * [Credits] Command
  24. #--------------------------------------------------------------------------
  25. def command_credits
  26. close_command_window
  27. SceneManager.call(Scene_Credits)
  28. end
  29. end
  30.  
  31. class Window_Credits < Window_Base
  32. #--------------------------------------------------------------------------
  33. # * Object Initialization
  34. #--------------------------------------------------------------------------
  35. def initialize
  36. super(0, 0, window_width, 416)
  37. refresh
  38. end
  39. #--------------------------------------------------------------------------
  40. # * Get Window Width
  41. #--------------------------------------------------------------------------
  42. def window_width
  43. return 544
  44. end
  45. #--------------------------------------------------------------------------
  46. # * Refresh
  47. #--------------------------------------------------------------------------
  48. def refresh
  49. contents.clear
  50. draw_text_ex(0, 0, '\C[2]' + "Credits") #This is how to write escape character.
  51. draw_text_ex(0, 20, "Credits")
  52. draw_text_ex(0, 40, "Credits")
  53. draw_text_ex(0, 60, "Credits")
  54. draw_text_ex(0, 80, "Credits")
  55. draw_text_ex(0, 100, "Credits")
  56. draw_text_ex(0, 120, "Credits")
  57. draw_text_ex(0, 140, "Credits")
  58. draw_text_ex(0, 160, "Credits")
  59. draw_text_ex(0, 180, "Credits")
  60. draw_text_ex(0, 200, "Credits")
  61. draw_text_ex(0, 220, "Credits")
  62. draw_text_ex(0, 240, "Credits")
  63. draw_text_ex(0, 260, "Credits")
  64. draw_text_ex(0, 280, "Credits")
  65. draw_text_ex(0, 300, "Credits")
  66. draw_text_ex(0, 320, "Credits")
  67. draw_text_ex(0, 340, "Credits")
  68. draw_text_ex(0, 360, "Credits")
  69. end
  70. #--------------------------------------------------------------------------
  71. # * Open Window
  72. #--------------------------------------------------------------------------
  73. def open
  74. refresh
  75. super
  76. end
  77.  
  78. end
  79.  
  80. #==============================================================================
  81. # ** Scene_Status
  82. #------------------------------------------------------------------------------
  83. # This class performs the status screen processing.
  84. #==============================================================================
  85.  
  86. class Scene_Credits < Scene_MenuBase
  87. #--------------------------------------------------------------------------
  88. # * Start Processing
  89. #--------------------------------------------------------------------------
  90. def start
  91. super
  92. create_credits_window
  93. end
  94.  
  95. def create_credits_window
  96. @credits_window = Window_Credits.new
  97. @credits_window.x = 0
  98. @credits_window.y = 0
  99. end
  100.  
  101. def update
  102. super
  103. update_credits
  104. end
  105.  
  106. def update_credits
  107. return credits_return if Input.trigger?(:C)
  108. return credits_return if Input.trigger?(:B)
  109. end
  110.  
  111. def credits_return
  112. Sound.play_cancel
  113. SceneManager.goto(Scene_Title)
  114. end
  115. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement