Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #==============================================
- # Neo Menu System :: By Zetu (RMVXAce)
- #==============================================
- module Z01
- MENUCOMMANDLIST = [
- #"Vocab", :symbol, "Boolean", script call, if require char selection, method to call
- # For literals in Vocab, use "' '" (Or single quotes wrapped in double quotes)
- # otherwise, it will run as code.
- ["Vocab::item", :item, "main_commands_enabled", false, :command_item],
- ["Vocab::skill", :skill, "main_commands_enabled", true, :command_skill],
- ["Vocab::equip", :equip, "main_commands_enabled", true, :command_equip],
- ["Vocab::status", :status, "main_commands_enabled", true, :command_status],
- ["Vocab::formation", :formation, "formation_enabled", false, :command_formation],
- ["Vocab::save", :save, "save_enabled", false, :command_formation],
- ["Vocab::game_end", :game_end, "true", false, :command_game_end]
- #["'Sample of Literal'", :symbol, "boolean", requires char selection?, event call symbol]
- ]
- end
- class Window_MenuCommand < Window_Command
- def make_command_list
- for command in Z01::MENUCOMMANDLIST
- add_command(eval(command[0]), command[1], eval(command[2]))
- end
- end
- end
- class Scene_Menu < Scene_MenuBase
- def create_command_window
- @command_window = Window_MenuCommand.new
- for command in Z01::MENUCOMMANDLIST
- if command[3]
- @command_window.set_handler(command[1], method(command[4]))
- else
- @command_window.set_handler(command[1], method(:command_personal))
- end
- end
- @command_window.set_handler(:cancel, method(:return_scene))
- end
- def on_personal_ok
- method(Z01[@command_window.index][4]).call
- end
- def command_skill
- SceneManager.call(Scene_Skill)
- end
- def command_equip
- SceneManager.call(Scene_Equip)
- end
- def command_status
- SceneManager.call(Scene_Status)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement