#==============================================================================
# ■ Window_MenuStatus
#------------------------------------------------------------------------------
# 显示菜单画面和同伴状态的窗口。
#==============================================================================
class Window_MenuStatus < Window_Selectable
#--------------------------------------------------------------------------
# ● 初始化目标
#--------------------------------------------------------------------------
def initialize
super(0, 0, 640, 480)
@column_max = 4
self.contents = Bitmap.new(width - 32, height - 32)
self.opacity = 0
refresh
self.active = false
self.index = -1
end
def draw_actor_face(actor,x,y)
case actor.id
when 1
bitmap = RPG::Cache.picture("1_q")
when 2
bitmap = RPG::Cache.picture("2_q")
when 3
bitmap = RPG::Cache.picture("3_q")
else
bitmap = RPG::Cache.picture("4_q")
end
cw = bitmap.width
ch = bitmap.height
src_rect = Rect.new(0, 0, cw, ch)
self.contents.blt(x , y , bitmap, src_rect)
end
#--------------------------------------------------------------------------
# ● 刷新
#--------------------------------------------------------------------------
def refresh
self.contents.clear
@item_max = $game_party.actors.size
for i in 0...$game_party.actors.size
#x = 64
#y = i * 116
x = i*150
y = 64
actor = $game_party.actors[i]
draw_actor_face(actor, x, y)
draw_actor_hp_meter_line(actor, x+35,y+240,100,12)
draw_actor_sp_meter_line(actor, x+35,y+270,100,12)
EXP(actor, x+30,y+300)
draw_actor_hp(actor, x + 10, y + 230)
draw_actor_sp(actor, x + 10, y + 260)
# draw_actor_graphic(actor, x + 60, y + 80)
# draw_actor_graphic(actor, x - 40, y + 80)
draw_actor_name(actor, x+25, y+150)
draw_actor_class(actor, x + 10, y+180)
# draw_actor_level(actor, x, y + 32)
draw_actor_level(actor, x+10, y+205)
draw_actor_state(actor, x + 10, y + 340)
draw_actor_exp(actor, x+10, y + 310)
end
end
#--------------------------------------------------------------------------
# ● 刷新光标矩形
#--------------------------------------------------------------------------
def update_cursor_rect
if @index < 0
self.cursor_rect.empty
else
#self.cursor_rect.set(0, @index * 116, self.width - 32, 96)
self.cursor_rect.set(@index * 150, 64, 150, 385)
end
end
end