#==============================================================================
# ** Keyboard Input Module
#==============================================================================
# Near Fantastica
# Version 5
# 29.11.05
#==============================================================================
# The Keyboard Input Module is designed to function as the default Input module
# dose. It is better then other methods keyboard input because as a key is
# tested it is not removed form the list. so you can test the same key multiple
# times the same loop.
#==============================================================================

class Window_Item < Window_Selectable
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
if self.contents != nil
self.contents.dispose
self.contents = nil
end
@data = []
# For Out Of Battle Use
unless $game_temp.in_battle
# Add item
for i in 1...$data_items.size
if $game_party.item_number(i) > 0
@data.push($data_items[i])
end
end
# Adds In Actor Item Cache
for actor in $game_party.actors
for item in actor.item_cache
@data << item unless @data.include?(item)
end
end
# Also add weapons and items if outside of battle
for i in 1...$data_weapons.size
if $game_party.weapon_number(i) > 0
@data.push($data_weapons[i])
end
end
for i in 1...$data_armors.size
if $game_party.armor_number(i) > 0
@data.push($data_armors[i])
end
end
# For In Battle Use
else
for item in $scene.active_battler.item_cache
@data << item
end
end
# If item count is not 0, make a bit map and draw all items
@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
end
end