# if self.contents != nil
# self.contents.dispose
# self.contents = nil
# end
@data = []
# 添加报务
for i in 1...$data_items.size
if $game_party.item_number(i) > 0
@data.push($data_items)
number = $game_party.item_number(i)
if number > 20
gs = number/20
gs -=1 if number % 20 == 0 and number >= 198
for j in 0...gs
@data.push($data_items)
end
end
end
end
# 在战斗中以外添加武器、防具
unless $game_temp.in_battle
for i in 1...$data_weapons.size
if $game_party.weapon_number(i) > 0
@data.push($data_weapons)
end
end
for i in 1...$data_armors.size
if $game_party.armor_number(i) > 0
@data.push($data_armors)
end
end
end
# 如果项目数不是 0 就生成位图、重新描绘全部项目
# @item_max = @data.size
# if @item_max > 0
# self.contents = Bitmap.new(width - 32, row_max * 32)
# for i in 0...@item_max
# draw_item(i)
# end
# end
case item
when RPG::Item
number = $game_party.item_number(item.id)
number = 20 if item.id == item2.id
number = number % 20 if item.id != item2.id
number = 20 if item.id != item2.id and number % 20 ==0
when RPG::Weapon
number = $game_party.weapon_number(item.id)
when RPG::Armor
number = $game_party.armor_number(item.id)
end
if item.is_a?(RPG::Item) and
$game_party.item_can_use?(item.id)
self.contents.font.color = normal_color
else
self.contents.font.color = disabled_color
end