Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #--------------------------------------------------------------------------
- # AriArk's Menu Options
- # Vesion 1.00
- #--------------------------------------------------------------------------
- # This script will let you add menu options to the menu scene.
- #--------------------------------------------------------------------------
- class Scene_Menu < Scene_MenuBase
- #--------------------------------------------------------------------------
- # CUSTOM SETTINGS
- #--------------------------------------------------------------------------
- # I am using Load as an example menu option, change this to use your own.
- #--------------------------------------------------------------------------
- # Just change and copy paste the load commands.
- #--------------------------------------------------------------------------
- def create_command_window
- @command_window = Window_MenuCommand.new
- @command_window.set_handler(:item, method(:command_item))
- @command_window.set_handler(:skill, method(:command_personal))
- @command_window.set_handler(:equip, method(:command_personal))
- @command_window.set_handler(:status, method(:command_personal))
- @command_window.set_handler(:formation, method(:command_formation))
- @command_window.set_handler(:save, method(:command_save))
- @command_window.set_handler(:game_end, method(:command_game_end))
- @command_window.set_handler(:cancel, method(:return_scene))
- # @command_window.set_handler(:load, method(:command_load))
- end
- end
- #---------------------------------------------------------------------------
- class Window_MenuCommand < Window_Command
- #---------------------------------------------------------------------------
- # DO NOT TOUCH
- #---------------------------------------------------------------------------
- def make_command_list
- add_main_commands
- add_formation_command
- add_custom_commands
- add_original_commands
- add_save_command
- add_game_end_command
- end
- #--------------------------------------------------------------------------
- # END OF DO NOT TOUCH
- #--------------------------------------------------------------------------
- #--------------------------------------------------------------------------
- # * Add Custom Commands to Command List
- #--------------------------------------------------------------------------
- def add_custom_commands
- # add_command("Load", :load, main_commands_enabled)
- # add_command("Text", :x, main_commands_enabled)
- end
- end
- #--------------------------------------------------------------------------
- class Scene_Menu < Scene_MenuBase
- #--------------------------------------------------------------------------
- # Custom Command
- #--------------------------------------------------------------------------
- def command_load
- # SceneManager.call(Scene_Load)
- end
- #--------------------------------------------------------------------------
- # Personal Command
- #--------------------------------------------------------------------------
- # These is the commands in which you select the actor.
- #--------------------------------------------------------------------------
- def on_personal_ok
- case @command_window.current_symbol
- when :skill
- SceneManager.call(Scene_Skill)
- when :equip
- SceneManager.call(Scene_Equip)
- when :status
- SceneManager.call(Scene_Status)
- # when :z
- # SceneManager.call(Scene_y)
- end
- end
- #----------------------------------------------------------------------------
- # END OF CUSTOM SETTINGS
- #----------------------------------------------------------------------------
- def start
- super
- create_command_window
- create_gold_window
- create_status_window
- end
- def create_gold_window
- @gold_window = Window_Gold.new
- @gold_window.x = 0
- @gold_window.y = Graphics.height - @gold_window.height
- end
- def create_status_window
- @status_window = Window_MenuStatus.new(@command_window.width, 0)
- end
- def command_item
- SceneManager.call(Scene_Item)
- end
- def command_personal
- @status_window.select_last
- @status_window.activate
- @status_window.set_handler(:ok, method(:on_personal_ok))
- @status_window.set_handler(:cancel, method(:on_personal_cancel))
- end
- def command_formation
- @status_window.select_last
- @status_window.activate
- @status_window.set_handler(:ok, method(:on_formation_ok))
- @status_window.set_handler(:cancel, method(:on_formation_cancel))
- end
- def command_save
- SceneManager.call(Scene_Save)
- end
- def command_game_end
- SceneManager.call(Scene_End)
- end
- def on_personal_cancel
- @status_window.unselect
- @command_window.activate
- end
- def on_formation_ok
- if @status_window.pending_index >= 0
- $game_party.swap_order(@status_window.index,
- @status_window.pending_index)
- @status_window.pending_index = -1
- @status_window.redraw_item(@status_window.index)
- else
- @status_window.pending_index = @status_window.index
- end
- @status_window.activate
- end
- def on_formation_cancel
- if @status_window.pending_index >= 0
- @status_window.pending_index = -1
- @status_window.activate
- else
- @status_window.unselect
- @command_window.activate
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment