Project1

标题: 请问怎么才可以把菜单改成这样? [打印本页]

作者: YS4RWQEYTEF    时间: 2014-8-4 07:26
标题: 请问怎么才可以把菜单改成这样?
本帖最后由 YS4RWQEYTEF 于 2014-8-4 09:00 编辑

我用的是这个脚本,请问怎么把读档改成存档?
RUBY 代码复制
  1. #encoding:utf-8
  2. #==============================================================================
  3. # ■ Window_MenuStatus
  4. #------------------------------------------------------------------------------
  5. #  菜单画面中,显示队伍成员状态的窗口
  6. #==============================================================================
  7.  
  8. class Window_MenuStatus < Window_Selectable
  9.   #--------------------------------------------------------------------------
  10.   # ● 初始化对象
  11.   #--------------------------------------------------------------------------
  12.   def initialize(x, y)
  13.     super(x, y, window_width, window_height)
  14.     self.y = Graphics.height - self.height
  15.     @pending_index = -1
  16.     refresh
  17.   end
  18.   #--------------------------------------------------------------------------
  19.   # ● 获取窗口的高度
  20.   #--------------------------------------------------------------------------
  21.   def window_height
  22.     112
  23.   end
  24.   #--------------------------------------------------------------------------
  25.   # ● 获取项目数
  26.   #--------------------------------------------------------------------------
  27.   def item_max
  28.     return 1 #$game_party.members.size
  29.   end
  30.   #--------------------------------------------------------------------------
  31.   # ● 绘制简单的状态
  32.   #--------------------------------------------------------------------------
  33.   def draw_actor_simple_status(actor, x, y)
  34.     draw_actor_name(actor, x, y)
  35.     draw_actor_level(actor, x, y + line_height * 1 + 10)
  36.     draw_actor_icons(actor, x, y + line_height * 2)
  37.     draw_actor_class(actor, x + 120, y)
  38.   end
  39.   #--------------------------------------------------------------------------
  40.   # ● 绘制等级
  41.   #--------------------------------------------------------------------------
  42.   def draw_actor_level(actor, x, y)
  43.     change_color(system_color)
  44.     draw_text(x, y, 64, line_height, Vocab::level_a)
  45.     change_color(normal_color)
  46.     draw_text(x + 64, y, 24, line_height, actor.level, 2)
  47.   end
  48. end
  49. #==============================================================================
  50. # ■ Window_MenuCommand
  51. #------------------------------------------------------------------------------
  52. #  菜单画面中显示指令的窗口
  53. #==============================================================================
  54. VOCAB_LOAD = "读档"
  55.  
  56. class Window_MenuCommand < Window_Command
  57.   #--------------------------------------------------------------------------
  58.   # ● 生成指令列表
  59.   #--------------------------------------------------------------------------
  60.   def make_command_list
  61.     add_main_commands
  62.     add_original_commands
  63.     add_load_command
  64.     add_game_end_command
  65.   end
  66.   #--------------------------------------------------------------------------
  67.   # ● 向指令列表添加主要的指令
  68.   #--------------------------------------------------------------------------
  69.   def add_main_commands
  70.     add_command(Vocab::item,   :item,   main_commands_enabled)
  71.   end
  72.   #--------------------------------------------------------------------------
  73.   # ● 添加读档指令
  74.   #--------------------------------------------------------------------------
  75.   def add_load_command
  76.     add_command(VOCAB_LOAD, :load, continue_enabled)
  77.   end
  78.   #--------------------------------------------------------------------------
  79.   # ● 获取“继续游戏”选项是否有效
  80.   #--------------------------------------------------------------------------
  81.   def continue_enabled
  82.     DataManager.save_file_exists?
  83.   end
  84. end
  85. #==============================================================================
  86. # ■ Scene_Menu
  87. #------------------------------------------------------------------------------
  88. #  菜单画面
  89. #==============================================================================
  90. class Scene_Menu < Scene_MenuBase
  91.   #--------------------------------------------------------------------------
  92.   # ● 开始处理
  93.   #--------------------------------------------------------------------------
  94.   def start
  95.     super
  96.     create_command_window
  97.     create_status_window
  98.   end
  99.   #--------------------------------------------------------------------------
  100.   # ● 生成指令窗口
  101.   #--------------------------------------------------------------------------
  102.   def create_command_window
  103.     @command_window = Window_MenuCommand.new
  104.     @command_window.x = 0 #(Graphics.width - @command_window.width) / 2
  105.     @command_window.y = (Graphics.height - @command_window.height) #/ 2
  106.     @command_window.set_handler(:item,      method(:command_item))
  107.     @command_window.set_handler(:load,      method(:command_load))
  108.     @command_window.set_handler(:game_end,  method(:command_game_end))
  109.     @command_window.set_handler(:cancel,    method(:return_scene))
  110.   end  
  111.   #--------------------------------------------------------------------------
  112.   # ● 指令“读档”
  113.   #--------------------------------------------------------------------------
  114.   def command_load
  115.     SceneManager.call(Scene_Load)
  116.   end
  117. end



改成了这样但是是灰色的

RUBY 代码复制
  1. #encoding:utf-8
  2. #==============================================================================
  3. # ■ Window_MenuStatus
  4. #------------------------------------------------------------------------------
  5. #  菜单画面中,显示队伍成员状态的窗口
  6. #==============================================================================
  7.  
  8. class Window_MenuStatus < Window_Selectable
  9.   #--------------------------------------------------------------------------
  10.   # ● 初始化对象
  11.   #--------------------------------------------------------------------------
  12.   def initialize(x, y)
  13.     super(x, y, window_width, window_height)
  14.     self.y = Graphics.height - self.height
  15.     @pending_index = -1
  16.     refresh
  17.   end
  18.   #--------------------------------------------------------------------------
  19.   # ● 获取窗口的高度
  20.   #--------------------------------------------------------------------------
  21.   def window_height
  22.     112
  23.   end
  24.   #--------------------------------------------------------------------------
  25.   # ● 获取项目数
  26.   #--------------------------------------------------------------------------
  27.   def item_max
  28.     return 1 #$game_party.members.size
  29.   end
  30.   #--------------------------------------------------------------------------
  31.   # ● 绘制简单的状态
  32.   #--------------------------------------------------------------------------
  33.   def draw_actor_simple_status(actor, x, y)
  34.     draw_actor_name(actor, x, y)
  35.     draw_actor_level(actor, x, y + line_height * 1 + 10)
  36.     draw_actor_icons(actor, x, y + line_height * 2)
  37.     draw_actor_class(actor, x + 120, y)
  38.   end
  39.   #--------------------------------------------------------------------------
  40.   # ● 绘制等级
  41.   #--------------------------------------------------------------------------
  42.   def draw_actor_level(actor, x, y)
  43.     change_color(system_color)
  44.     draw_text(x, y, 64, line_height, Vocab::level_a)
  45.     change_color(normal_color)
  46.     draw_text(x + 64, y, 24, line_height, actor.level, 2)
  47.   end
  48. end
  49. #==============================================================================
  50. # ■ Window_MenuCommand
  51. #------------------------------------------------------------------------------
  52. #  菜单画面中显示指令的窗口
  53. #==============================================================================
  54. VOCAB_SAVE = "存档"
  55.  
  56. class Window_MenuCommand < Window_Command
  57.   #--------------------------------------------------------------------------
  58.   # ● 生成指令列表
  59.   #--------------------------------------------------------------------------
  60.   def make_command_list
  61.     add_main_commands
  62.     add_original_commands
  63.     add_save_command
  64.     add_game_end_command
  65.   end
  66.   #--------------------------------------------------------------------------
  67.   # ● 向指令列表添加主要的指令
  68.   #--------------------------------------------------------------------------
  69.   def add_main_commands
  70.     add_command(Vocab::item,   :item,   main_commands_enabled)
  71.   end
  72.   #--------------------------------------------------------------------------
  73.   # ● 添加存档指令
  74.   #--------------------------------------------------------------------------
  75.   def add_save_command
  76.     add_command(VOCAB_SAVE, :save, continue_enabled)
  77.   end
  78.   #--------------------------------------------------------------------------
  79.   # ● 获取“继续游戏”选项是否有效
  80.   #--------------------------------------------------------------------------
  81.   def continue_enabled
  82.     DataManager.save_file_exists?
  83.   end
  84. end
  85. #==============================================================================
  86. # ■ Scene_Menu
  87. #------------------------------------------------------------------------------
  88. #  菜单画面
  89. #==============================================================================
  90. class Scene_Menu < Scene_MenuBase
  91.   #--------------------------------------------------------------------------
  92.   # ● 开始处理
  93.   #--------------------------------------------------------------------------
  94.   def start
  95.     super
  96.     create_command_window
  97.     create_status_window
  98.   end
  99.   #--------------------------------------------------------------------------
  100.   # ● 生成指令窗口
  101.   #--------------------------------------------------------------------------
  102.   def create_command_window
  103.     @command_window = Window_MenuCommand.new
  104.     @command_window.x = 0 #(Graphics.width - @command_window.width) / 2
  105.     @command_window.y = (Graphics.height - @command_window.height) #/ 2
  106.     @command_window.set_handler(:item,      method(:command_item))
  107.     @command_window.set_handler(:save,      method(:command_save))
  108.     @command_window.set_handler(:game_end,  method(:command_game_end))
  109.     @command_window.set_handler(:cancel,    method(:return_scene))
  110.   end  
  111.   #--------------------------------------------------------------------------
  112.   # ● 指令“存档”
  113.   #--------------------------------------------------------------------------
  114.   def command_save
  115.     SceneManager.call(Scene_Save)
  116.   end
  117. end

捕获.JPG (41.08 KB, 下载次数: 37)

捕获.JPG

作者: 冰之滄月    时间: 2014-8-4 07:54
这么简单用图片
作者: taroxd    时间: 2014-8-4 08:19
修改Graphics/System文件夹下的Window.png
作者: 3106345123    时间: 2014-8-4 08:29
你的意思是不是修改菜单选项?如果是,
https://rpg.blue/home.php?mod=sp ... o=blog&id=12246
作者: 南城萌夏    时间: 2014-8-4 09:14
本帖最后由 南城萌夏 于 2014-8-4 09:18 编辑

修改一下这里
#--------------------------------------------------------------------------
  # ● 添加存档指令
  #--------------------------------------------------------------------------
  def add_save_command
    add_command(VOCAB_SAVE, :save, save_enabled)
  end




欢迎光临 Project1 (https://rpg.blue/) Powered by Discuz! X3.1