#encoding:utf-8 #============================================================================== # ■ Scene_Item #------------------------------------------------------------------------------ # 物品画面 #============================================================================== class Scene_Item < Scene_ItemBase #-------------------------------------------------------------------------- # ● [别名修改]开始处理 #-------------------------------------------------------------------------- alias start_for_category start def start start_for_category # 调用原方法 activate_item_window end #-------------------------------------------------------------------------- # ● [别名修改]启用物品窗口 #-------------------------------------------------------------------------- alias activate_item_window_for_key_item activate_item_window def activate_item_window activate_item_window_for_key_item # 调用原方法 @item_window.category = :key_item @item_window.select_last end #-------------------------------------------------------------------------- # ● [覆盖]生成分类窗口 #-------------------------------------------------------------------------- def create_category_window @category_window = Window_Base.new(-16, -16, 16, 16) end #-------------------------------------------------------------------------- # ● [覆盖]生成物品窗口 #-------------------------------------------------------------------------- def create_item_window wy = @help_window.y + @help_window.height # 修改此行 wh = Graphics.height - wy @item_window = Window_ItemList.new(0, wy, Graphics.width, wh) @item_window.viewport = @viewport @item_window.help_window = @help_window @item_window.set_handler(:ok, method(:on_item_ok)) @item_window.set_handler(:cancel, method(:return_scene)) # 修改此行 # @category_window.item_window = @item_window end end
#encoding:utf-8
#==============================================================================
# ■ Scene_Item
#------------------------------------------------------------------------------
# 物品画面
#==============================================================================
class Scene_Item < Scene_ItemBase
#--------------------------------------------------------------------------
# ● [别名修改]开始处理
#--------------------------------------------------------------------------
alias start_for_category start
def start
start_for_category # 调用原方法
activate_item_window
end
#--------------------------------------------------------------------------
# ● [别名修改]启用物品窗口
#--------------------------------------------------------------------------
alias activate_item_window_for_key_item activate_item_window
def activate_item_window
activate_item_window_for_key_item # 调用原方法
@item_window.category = :key_item
@item_window.select_last
end
#--------------------------------------------------------------------------
# ● [覆盖]生成分类窗口
#--------------------------------------------------------------------------
def create_category_window
@category_window = Window_Base.new(-16, -16, 16, 16)
end
#--------------------------------------------------------------------------
# ● [覆盖]生成物品窗口
#--------------------------------------------------------------------------
def create_item_window
wy = @help_window.y + @help_window.height # 修改此行
wh = Graphics.height - wy
@item_window = Window_ItemList.new(0, wy, Graphics.width, wh)
@item_window.viewport = @viewport
@item_window.help_window = @help_window
@item_window.set_handler(:ok, method(:on_item_ok))
@item_window.set_handler(:cancel, method(:return_scene)) # 修改此行
# @category_window.item_window = @item_window
end
end
|