vindaca510

Pause Screen v1.0

Aug 4th, 2014
358
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.77 KB | None | 0 0
  1.  
  2. ################################################################################
  3. #↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓#
  4. #↓ ↓#
  5. #↓ Pause Screen: Version 1.0 ↓#
  6. #↓ ↓#
  7. #↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕#
  8. #↑ ↑#
  9. #↑ Written By: Joe Pro ↑#
  10. #↑ Last Edited: July 31, 2014 ↑#
  11. #↑ ↑#
  12. #↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑#
  13. ################################################################################
  14.  
  15. #◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙#
  16. #◙ ** Disclaimer ◙#
  17. #◙••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••◙#
  18. #◙ ◙#
  19. #◙ This script is not for commercial, if you wish to use this script in a ◙#
  20. #◙ game please PM me. All credit is to be given to me as the author of this ◙#
  21. #◙ script. ◙#
  22. #◙ ◙#
  23. #◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙#
  24. #◙ ** How To Use ◙#
  25. #◙••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••◙#
  26. #◙ ◙#
  27. #◙ * Cusomizable area below. ◙#
  28. #◙ ◙#
  29. #◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙#
  30. #◙ ** Updates / Version Notes ◙#
  31. #◙••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••◙#
  32. #◙ ◙#
  33. #◙ v0.1 ◙#
  34. #◙ ~◄◙◙◙◙►~ ◙#
  35. #◙ * This script create a simple pause screen for the game map. ◙#
  36. #◙ ◙#
  37. #◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙#
  38.  
  39.  
  40.  
  41. ################################################################################
  42. #↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓#
  43. #↓ ↓#
  44. #↕ Pause Screen: Version 0.1 ↕#
  45. #↑ ↑#
  46. #↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑#
  47. ################################################################################
  48.  
  49.  
  50.  
  51. #===============================================================================
  52. # ** Pause Screen Module
  53. #------------------------------------------------------------------------------
  54. # This module manages the customizable and function modules.
  55. #===============================================================================
  56. module Pause_Screen
  57.  
  58.  
  59.  
  60. #◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙#
  61. #◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙#
  62. #◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙Customizeable Area◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙#
  63. #◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙#
  64. #◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙#
  65.  
  66. #=============================================================================
  67. # * Menu Windows BG Options
  68. #=============================================================================
  69. Pause_Screen_Image = "book bg"
  70.  
  71. #=============================================================================
  72. # * Pause Tigger Button
  73. #=============================================================================
  74. Pause_Trigger = :START
  75.  
  76. #=============================================================================
  77. # * Pause Screen Texts
  78. # [x, y, text, alignment, font_size]
  79. #=============================================================================
  80. Pause_Screen_Texts = {
  81.  
  82. "Paused" => {
  83. :x => -10,
  84. :y => -10,
  85. :alignment => -10,
  86. :font_size => 28,
  87. },
  88.  
  89. "(Press Start to resume)" => {
  90. :x => -10,
  91. :y => -10,
  92. :alignment => -10,
  93. :font_size => 28,
  94. },
  95.  
  96. }
  97.  
  98. #◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙#
  99. #◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙#
  100. #◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙End Customizeable Area◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙#
  101. #◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙#
  102. #◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙#
  103.  
  104.  
  105.  
  106. end
  107.  
  108. #==============================================================================
  109. # ** Scene_Map
  110. #------------------------------------------------------------------------------
  111. # This class performs the map screen processing.
  112. #==============================================================================
  113.  
  114. class Scene_Map < Scene_Base
  115.  
  116. #--------------------------------------------------------------------------
  117. # * Aliasing Method: Object Initialization
  118. #--------------------------------------------------------------------------
  119. alias :smu054 :update
  120.  
  121. #--------------------------------------------------------------------------
  122. # * Frame Update
  123. #--------------------------------------------------------------------------
  124. def update
  125. smu054()
  126. SceneManager.call(Scene_Pause) if Input.trigger?(Pause_Screen::Pause_Trigger)
  127. end
  128.  
  129. end
  130.  
  131.  
  132. #==============================================================================
  133. # ** Window_Base
  134. #------------------------------------------------------------------------------
  135. # This is a super class of all windows within the game.
  136. #==============================================================================
  137.  
  138. class Window_Pause < Window_Base
  139.  
  140. #--------------------------------------------------------------------------
  141. # * Object Initialization
  142. #--------------------------------------------------------------------------
  143. def initialize(x, y, width, height)
  144. super
  145. refresh
  146. end
  147.  
  148. #--------------------------------------------------------------------------
  149. # * Refresh Processing
  150. #--------------------------------------------------------------------------
  151. def refresh
  152. contents.clear
  153. texts = Pause_Screen::Pause_Screen_Texts
  154. texts.each_key { |i|
  155. draw_text_ve(texts[i][:x], texts[i][:y], Graphics.width, Graphics.height, i, texts[i][:alignment], texts[i][:font_size])
  156. }
  157. end
  158.  
  159. end
  160.  
  161.  
  162. #==============================================================================
  163. # ** Scene_Pause < Scene_MenuBase
  164. #------------------------------------------------------------------------------
  165. # This class performs basic processing related to the pause screen.
  166. #==============================================================================
  167.  
  168. class Scene_Pause < Scene_Base
  169.  
  170. #--------------------------------------------------------------------------
  171. # * Object Initialization
  172. #--------------------------------------------------------------------------
  173. def initialize
  174. create_windows
  175. end
  176.  
  177. #--------------------------------------------------------------------------
  178. # * Create Windows
  179. #--------------------------------------------------------------------------
  180. def create_windows
  181. create_pause_window
  182. create_background
  183. end
  184.  
  185. #--------------------------------------------------------------------------
  186. # * Create List Window
  187. #--------------------------------------------------------------------------
  188. def create_pause_window
  189. @pause_window = Window_Pause.new(0, 0, Graphics.width, Graphics.height)
  190. @pause_window.opacity = 0
  191. end
  192.  
  193. #--------------------------------------------------------------------------
  194. # * Create List Window
  195. #--------------------------------------------------------------------------
  196. def create_background
  197. @background = Sprite.new
  198. @background.bitmap = Cache.picture(Pause_Screen::Pause_Screen_Image)
  199. @background.zoom_x = Graphics.width.to_f / @background.width
  200. @background.zoom_y = Graphics.height.to_f / @background.height
  201. @background.opacity = 175
  202. end
  203.  
  204. #--------------------------------------------------------------------------
  205. # * Update Processing
  206. #--------------------------------------------------------------------------
  207. def update
  208. super
  209. return_scene if Input.trigger?(Pause_Screen::Pause_Trigger)
  210. end
  211.  
  212. end
Advertisement
Add Comment
Please, Sign In to add comment