TheoAllen

In game load menu

Jan 25th, 2013
523
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 3.14 KB | None | 0 0
  1. # =============================================================================
  2. # ~ In game load menu by TheoAllen ~
  3. # =============================================================================
  4. # Description :
  5. # This script allow you to load saved games in game menu.
  6. # -----------------------------------------------------------------------------
  7. # Instruction :
  8. # Insert this script above main and below Material.
  9. # -----------------------------------------------------------------------------
  10. # Terms of use :
  11. # You may use and edit this script for both commercial and non-commercial.  
  12. # Credit isn't necessary. But if yu wish to, you can put "TheoAllen" in your
  13. # credit list.
  14. # =============================================================================
  15. # Configuration :
  16. # =============================================================================
  17. module THEOLIZED
  18.  
  19.   LOAD_MENU = "Load" # load menu
  20.  
  21. end
  22. # =============================================================================
  23. # Do not edit unless you know what to do ~
  24. # =============================================================================
  25. class Window_MenuCommand < Window_Command
  26. #--------------------------------------------------------------------------
  27.   # ~ Redefine Command list
  28.   #--------------------------------------------------------------------------
  29.   def make_command_list
  30.     add_main_commands
  31.     add_formation_command
  32.     add_original_commands
  33.     add_save_command
  34.     add_load_command
  35.     add_game_end_command
  36.   end
  37.   #--------------------------------------------------------------------------
  38.   # ~ Add load command
  39.   #--------------------------------------------------------------------------
  40.   def add_load_command
  41.     add_command(THEOLIZED::LOAD_MENU, :continue, main_commands_enabled)
  42.   end
  43. end
  44.  
  45. class Scene_Menu < Scene_MenuBase
  46.   #--------------------------------------------------------------------------
  47.   # Redefine Command Window
  48.   #--------------------------------------------------------------------------
  49.   def create_command_window
  50.     @command_window = Window_MenuCommand.new
  51.     @command_window.set_handler(:item,      method(:command_item))
  52.     @command_window.set_handler(:skill,     method(:command_personal))
  53.     @command_window.set_handler(:equip,     method(:command_personal))
  54.     @command_window.set_handler(:status,    method(:command_personal))
  55.     @command_window.set_handler(:formation, method(:command_formation))
  56.     @command_window.set_handler(:save,      method(:command_save))
  57.     @command_window.set_handler(:continue,  method(:command_continue))
  58.     @command_window.set_handler(:game_end,  method(:command_game_end))
  59.     @command_window.set_handler(:cancel,    method(:return_scene))
  60.   end
  61.   #--------------------------------------------------------------------------
  62.   # ~ [Load] Command
  63.   #--------------------------------------------------------------------------
  64.   def command_continue
  65.     SceneManager.call(Scene_Load)
  66.   end
  67. end
  68. # =============================================================================
  69. # End of script
  70. # =============================================================================
Advertisement
Add Comment
Please, Sign In to add comment