#encoding:utf-8
#==============================================================================
# ■ Window_MenuStatus
#------------------------------------------------------------------------------
# 菜单画面中,显示队伍成员状态的窗口
#==============================================================================
class Window_MenuStatus < Window_Selectable
#--------------------------------------------------------------------------
# ● 初始化对象
#--------------------------------------------------------------------------
def initialize(x, y)
super(x, y, window_width, window_height)
self.y = Graphics.height - self.height
@pending_index = -1
refresh
end
#--------------------------------------------------------------------------
# ● 取得視窗的寬度
#--------------------------------------------------------------------------
def window_width
Graphics.width - 160
end
#--------------------------------------------------------------------------
# ● 取得視窗的高度
#--------------------------------------------------------------------------
def window_height
Graphics.height
end
#--------------------------------------------------------------------------
# ● 获取项目数
#--------------------------------------------------------------------------
def item_max
return 1 #$game_party.members.size
end
#--------------------------------------------------------------------------
# ● 绘制简单的状态
#--------------------------------------------------------------------------
def draw_actor_simple_status(actor, x, y)
draw_actor_name(actor, x -102 , y +12)
draw_actor_nickname(actor, x + 142, y-8)
draw_actor_hp(actor, x -5, y-10)
draw_actor_mp(actor, x +20, y+10)
draw_actor_icons(actor, x, y + line_height * 2)
end
#--------------------------------------------------------------------------
# ● 繪制角色肖像圖
# enabled : 有效的標志。false 的時候使用半透明效果繪制
#--------------------------------------------------------------------------
def draw_face(face_name, face_index, x, y, enabled = true)
bitmap = Cache.face(face_name)
rect = Rect.new(face_index % 4 * 96, face_index / 4 * 116, 96, 46)
contents.blt(x, y, bitmap, rect, enabled ? 255 : translucent_alpha)
bitmap.dispose
end
#--------------------------------------------------------------------------
# ● 取得專案數
#--------------------------------------------------------------------------
def item_max
$game_party.members.size
end
#--------------------------------------------------------------------------
# ● 取得專案的高度
#--------------------------------------------------------------------------
def item_height
(height - standard_padding * 2) / 8
end
end