class Scene_Item
def start
super
create_help_window
#create_category_window #
create_item_window
force_thing(@item_window)
end
def force_thing(window)
window.active = true # 激活
window.category = :all # 自定义显示全部物品的符号
window.index = 0 # 显示选框
end
def create_item_window
wy = @help_window.height # 位置修改
wh = Graphics.height - wy-70
@background_sprite.bitmap =Cache.load_bitmap("Graphics/System/","bz")
@item_window = Window_ItemList.new(50, wy, 444, wh)
@item_window.viewport = @viewport
@item_window.opacity = 0
@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
class Window_ItemList
alias :iisnow_include? :include?
def include?(item)
if @category == :all # 添加全体判定
return true
else
return iisnow_include?(item)
end
end
end