level 1
fieu55
楼主
#==============================================================================
# ■ Window_MenuStatus
#------------------------------------------------------------------------------
# 显示菜单画面和同伴状态的窗口。
#==============================================================================
class Window_MenuStatus < Window_Selectable
#--------------------------------------------------------------------------
# ● 初始化对像
# x : 窗口 X 座标
# y : 窗口 Y 座标
#--------------------------------------------------------------------------
def initialize(x, y)
super(x, y, 384, 416)
refresh
self.active = false
self.index = -1
end
#--------------------------------------------------------------------------
# ● 刷新
#--------------------------------------------------------------------------
def refresh
self.contents.clear
@item_max = $game_party.members.size
if @item_max <= 4
for actor in $game_party.members
draw_actor_face(actor, 2, actor.index * 96 + 2, 92)
x = 104
y = actor.index * 96 + WLH / 2
draw_actor_name(actor, x, y)
draw_actor_class(actor, x + 120, y)
draw_actor_level(actor, x, y + WLH * 1)
draw_actor_state(actor, x, y + WLH * 2)
draw_actor_hp(actor, x + 120, y + WLH * 1)
draw_actor_mp(actor, x + 120, y + WLH * 2)
end
else
for actor in $game_party.members
for a in 0..@item_max-1
if a < 4
draw_actor_face(actor, 2, actor.index * 96 + 2, 92)
x = 4
y = actor.index * 96 + WLH / 2-12
draw_actor_name(actor, x, y)
draw_actor_class(actor, x + 120-24, y)
draw_actor_level(actor, x+120-24, y + WLH * 1)
draw_actor_hp(actor, x + 120-24, y + WLH * 1+24, 72)
draw_actor_mp(actor, x + 120-24, y + WLH * 2+24, 72)
else
draw_actor_face(actor, 2+176, (actor.index - 4) * 96 + 2, 92)
x = 4+176
y = (actor.index - 4) * 96 + WLH / 2-12
draw_actor_name(actor, x, y)
draw_actor_class(actor, x + 120-24, y)
draw_actor_level(actor, x+120-24, y + WLH * 1)
draw_actor_hp(actor, x + 120-24, y + WLH * 1+24, 72)
draw_actor_mp(actor, x + 120-24, y + WLH * 2+24, 72)
end
end
end
end
end
#--------------------------------------------------------------------------
# ● 更新光标
#--------------------------------------------------------------------------
def update_cursor
if @item_max <= 4
if @index < 0 # 无光标
self.cursor_rect.empty
elsif @index < @item_max # 一般