class Window_MenuCommand < Window_Command def make_command_list add_main_commands add_original_commands add_save_command add_game_end_command end def add_main_commands add_command(Vocab::item, :item, main_commands_enabled) end end class Scene_Menu < Scene_MenuBase def create_command_window @command_window = Window_MenuCommand.new @command_window.set_handler(:item, method(:command_item)) @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)) end end
class Window_MenuCommand < Window_Command
def make_command_list
add_main_commands
add_original_commands
add_save_command
add_game_end_command
end
def add_main_commands
add_command(Vocab::item, :item, main_commands_enabled)
end
end
class Scene_Menu < Scene_MenuBase
def create_command_window
@command_window = Window_MenuCommand.new
@command_window.set_handler(:item, method(:command_item))
@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))
end
end
插在脚本编辑器的Main上面
|