Advertisement
Ventwig

Ventwig's Pause Menu Add-Ons

Apr 9th, 2012
1,441
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 6.36 KB | None | 0 0
  1. #============================================================================
  2. #Pause Menu Features
  3. #By Ventwig
  4. #Version 1.3 - April 10 2012
  5. #For RPGMaker VX Ace
  6. #============================================================================
  7. # This simple scirpt was a request by JayPB08, then I decided I'd let everyone
  8. # have it :)
  9. # Thanks apoclaydon for pointing out a mistake where the icon didn't change!
  10. #=============================================================================
  11. # Description:
  12. # This code draws a gold window, and a playtime window (which counts up)
  13. # Right under the command window. They're two seperate windows to look nicer,
  14. # and you can disable one if you'd like :)
  15. # You can also draw icons, too!
  16. # And in v 1.3, I added a Gold Window Extension!
  17. #==============================================================================
  18. # Compatability:
  19. #  alias-es Scene_Menu Start
  20. #  Creates two new methods in Scene_Menu
  21. #  Works with Spike's Monentary System! OMG!
  22. #===============================================================================
  23. # Instructions: Put in materials, above main.Plug'N'Play
  24. #==============================================================================
  25. # Please give Credit to Ventwig if you would like to use one of my scripts!
  26. # Use it commericial or non-commercial, and feel free to tell me if you're using
  27. # it commercially!
  28. # You may edit my scripts, just don't claim as your own!
  29. #===============================================================================
  30. module VENTWIG #Do not touch
  31.  
  32. ##################################################################
  33. #Customization! Yay!
  34. ##################################################################
  35.  
  36.   #Disables (hides) the name/time window.
  37.   #No point in this script if both are true...
  38.   #True and False, default is both false.
  39.   DISABLE_NAME = false
  40.   DISABLE_TIME = false
  41.  
  42.   #Sets where to draw the window(s)
  43.   #Either under the command menu, or over the gold hud
  44.   #True = Under the command
  45.   #False = Over Gold
  46.   #Default false
  47.   UNDER_COMMAND = false
  48.  
  49.   #Chooses whether or not an icon will be drawn in the windows.
  50.   DRAW_ICON = true
  51.  
  52.   #Chooses whether or not to replace the gold window with a
  53.   #new icon-gold window. This is seperate to extend compatibility.
  54.   #Like Spike's Monentary System
  55.   DRAW_GICON = true
  56.  
  57.   #The index of the icon.
  58.   #Def NAME = 131 TIME = 280 GOLE = 361
  59.   NAME_ICON = 231
  60.   TIME_ICON = 280
  61.   GOLD_ICON = 361
  62.  
  63.  
  64. #########################################################################
  65. #End Of configuration. Touch anything below and it'll delete system32   #
  66. #########################################################################
  67. end
  68.  
  69. class Window_MenuMapName < Window_Base
  70.   def initialize
  71.     super(0,100,160,50)
  72.     if VENTWIG::DRAW_ICON == true
  73.       draw_text(30,0,120,25,$game_map.display_name)
  74.       draw_icon(VENTWIG::NAME_ICON,0,0,enabled = true)
  75.     else
  76.       draw_text(0,0,160,25,$game_map.display_name)
  77.     end
  78.   end
  79. end
  80.  
  81. class Window_MenuPlaytime < Window_Base
  82.   def initialize
  83.     super(0,100,160,50)
  84.     if VENTWIG::DRAW_ICON == true
  85.       draw_text(30,0,160,25,$game_system.playtime_s)
  86.       draw_icon(VENTWIG::TIME_ICON,0,0,enabled = true)
  87.     else
  88.       draw_text(0,0,160,25,$game_system.playtime_s)
  89.     end
  90.   end
  91.   def update
  92.     contents.clear
  93.     if VENTWIG::DRAW_ICON == true
  94.       draw_text(30,0,160,25,$game_system.playtime_s)
  95.       draw_icon(VENTWIG::TIME_ICON,0,0,enabled = true)
  96.     else
  97.       draw_text(0,0,160,25,$game_system.playtime_s)
  98.     end
  99.   end
  100. end
  101.  
  102. class Scene_Menu < Scene_MenuBase
  103.   alias ventwig_map_name_menu_start start
  104.   def start
  105.     ventwig_map_name_menu_start
  106.     if VENTWIG::DISABLE_NAME == false
  107.       create_map_name_window
  108.     end
  109.     if VENTWIG::DISABLE_TIME == false
  110.       create_playtime_window
  111.     end
  112.   end
  113.   def create_map_name_window
  114.     if VENTWIG::UNDER_COMMAND == true
  115.       @namemap_window = Window_MenuMapName.new
  116.       @namemap_window.x = 0
  117.       @namemap_window.y = @command_window.height
  118.       @namemap_window.width = @command_window.width
  119.       @namemap_window.height = 50
  120.     end
  121.     if VENTWIG::UNDER_COMMAND == false
  122.       if VENTWIG::DISABLE_TIME == false
  123.         @namemap_window = Window_MenuMapName.new
  124.         @namemap_window.x = 0
  125.         @namemap_window.y = @gold_window.y - 100
  126.         @namemap_window.width = @command_window.width
  127.         @namemap_window.height = 50
  128.       end
  129.       if VENTWIG::DISABLE_TIME == true
  130.         @namemap_window = Window_MenuMapName.new
  131.         @namemap_window.x = 0
  132.         @namemap_window.y = @gold_window.y - 50
  133.         @namemap_window.width = @command_window.width
  134.         @namemap_window.height = 50
  135.       end
  136.     end
  137.   end
  138.   def create_playtime_window
  139.     if VENTWIG::UNDER_COMMAND == true
  140.       if VENTWIG::DISABLE_NAME == false
  141.         @playtime_window = Window_MenuPlaytime.new
  142.         @playtime_window.x = 0
  143.         @playtime_window.y = @namemap_window.y + @namemap_window.height
  144.         @playtime_window.width = @command_window.width
  145.         @playtime_window.height = 50
  146.       end
  147.       if VENTWIG::DISABLE_NAME == true
  148.         @playtime_window = Window_MenuPlaytime.new
  149.         @playtime_window.x = 0
  150.         @playtime_window.y = @command_window.height
  151.         @playtime_window.width = @command_window.width
  152.         @playtime_window.height = 50
  153.       end
  154.     end
  155.     if VENTWIG::UNDER_COMMAND == false
  156.       if VENTWIG::DISABLE_NAME == false
  157.         @playtime_window = Window_MenuPlaytime.new
  158.         @playtime_window.x = 0
  159.         @playtime_window.y = @namemap_window.y + @namemap_window.height
  160.         @playtime_window.width = @command_window.width
  161.         @playtime_window.height = 50
  162.       end
  163.       if VENTWIG::DISABLE_NAME == true
  164.         @playtime_window = Window_MenuPlaytime.new
  165.         @playtime_window.x = 0
  166.         @playtime_window.y = @gold_window.y - 50
  167.         @playtime_window.width = @command_window.width
  168.         @playtime_window.height = 50
  169.       end
  170.     end
  171.   end
  172. end
  173.  
  174. if VENTWIG::DRAW_GICON == true
  175.   class Window_Gold < Window_Base
  176.     alias ventwig_window_gold_icon_show_update refresh
  177.     def refresh
  178.       ventwig_window_gold_icon_show_update
  179.       contents.clear
  180.       draw_icon(VENTWIG::GOLD_ICON,0,0)
  181.       draw_text(self.width - 25 - 10 *value.to_s.size, 0, contents.width - 8, self.height / 2, value)
  182.     end
  183.   end
  184. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement