#==============================================================================
# â– Window_Target
#------------------------------------------------------------------------------
#  アイテム画é¢ã¨ã‚¹ã‚ル画é¢ã§ã€ä½¿ç”¨å¯¾è±¡ã®ã‚¢ã‚¯ã‚¿ãƒ¼ã‚’é¸æŠžã™ã‚‹ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã§ã™ã€‚
#==============================================================================
class Window_Target < Window_Selectable
#--------------------------------------------------------------------------
# ◠オブジェクトåˆæœŸåŒ–
#--------------------------------------------------------------------------
def initialize
super(0, 0, 336, 480)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = $defaultfonttype # "Target" window font
self.contents.font.size = $defaultfontsize
self.z += 10
@item_max = $game_party.actors.size
refresh
end
#--------------------------------------------------------------------------
# ◠リフレッシュ
#--------------------------------------------------------------------------
def refresh
self.contents.clear
for i in 0...$game_party.actors.size
x = 4
y = i * 116
actor = $game_party.actors[i]
draw_actor_name(actor, x, y)
draw_actor_class(actor, x + 144, y)
draw_actor_level(actor, x + 8, y + 32)
draw_actor_state(actor, x + 8, y + 64)
draw_actor_hp(actor, x + 152, y + 32)
draw_actor_sp(actor, x + 152, y + 64)
end
end
#--------------------------------------------------------------------------
# ◠カーソルã®çŸ©å½¢æ›´æ–°
#--------------------------------------------------------------------------
def update_cursor_rect
# カーソルä½ç½® -1 ã¯å…¨é¸æŠžã€-2 以下ã¯å˜ç‹¬é¸æŠž (使用者自身)
if @index <= -2
self.cursor_rect.set(0, (@index + 10) * 116, self.width - 32, 96)
elsif @index == -1
self.cursor_rect.set(0, 0, self.width - 32, @item_max * 116 - 20)
else
self.cursor_rect.set(0, @index * 116, self.width - 32, 96)
end
end
end