Project1

标题: 求教如何删除多余的菜单 [打印本页]

作者: 靠谱的松鼠    时间: 2019-3-1 11:15
标题: 求教如何删除多余的菜单
我使用了喵呜喵5的美化菜单,原本的菜单被精简到2个(工程默认的脚本全部都没修改过),但是使用物品这个里边依旧有4个选项,请问如何删除贵重物品之外的选项


作者: KB.Driver    时间: 2019-3-1 11:44
RUBY 代码复制
  1. #encoding:utf-8
  2. #==============================================================================
  3. # ■ Scene_Item
  4. #------------------------------------------------------------------------------
  5. #  物品画面
  6. #==============================================================================
  7.  
  8. class Scene_Item < Scene_ItemBase
  9.   #--------------------------------------------------------------------------
  10.   # ● [别名修改]开始处理
  11.   #--------------------------------------------------------------------------
  12.   alias start_for_category start
  13.   def start
  14.     start_for_category # 调用原方法
  15.     activate_item_window
  16.   end
  17.   #--------------------------------------------------------------------------
  18.   # ● [别名修改]启用物品窗口
  19.   #--------------------------------------------------------------------------
  20.   alias activate_item_window_for_key_item activate_item_window
  21.   def activate_item_window
  22.     activate_item_window_for_key_item # 调用原方法
  23.     @item_window.category = :key_item
  24.     @item_window.select_last
  25.   end
  26.   #--------------------------------------------------------------------------
  27.   # ● [覆盖]生成分类窗口
  28.   #--------------------------------------------------------------------------
  29.   def create_category_window
  30.     @category_window = Window_Base.new(-16, -16, 16, 16)
  31.   end
  32.   #--------------------------------------------------------------------------
  33.   # ● [覆盖]生成物品窗口
  34.   #--------------------------------------------------------------------------
  35.   def create_item_window
  36.     wy = @help_window.y + @help_window.height # 修改此行
  37.     wh = Graphics.height - wy
  38.     @item_window = Window_ItemList.new(0, wy, Graphics.width, wh)
  39.     @item_window.viewport = @viewport
  40.     @item_window.help_window = @help_window
  41.     @item_window.set_handler(:ok,     method(:on_item_ok))
  42.     @item_window.set_handler(:cancel, method(:return_scene)) # 修改此行
  43.     # @category_window.item_window = @item_window
  44.   end
  45. end



作者: 喵呜喵5    时间: 2019-3-1 12:24
https://rpg.blue/home.php?mod=sp ... o=blog&id=12247




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