class Window_Base < Window
#--------------------------------------------------------------------------
# ● 绘制指定技能类型的技能
#--------------------------------------------------------------------------
def draw_types_skill(actor,stype_id,x,y,width = 160, height = line_height)
skills = actor.skills.select{|x| x.stype_id == stype_id}
skills.each_index do |index|
draw_item_name(skills[index], x, y )
rect = Rect.new(x, y, width, height)
draw_types_skill_cost(actor,rect, skills[index])
y += height if index % 2 == 1
x = index % 2 == 0 ? width : 0
end
end
#--------------------------------------------------------------------------
# ● 绘制技能的使用消耗
#--------------------------------------------------------------------------
def draw_types_skill_cost(actor, rect, skill)
if actor.skill_tp_cost(skill) > 0
change_color(tp_cost_color)
draw_text(rect, actor.skill_tp_cost(skill), 2)
elsif actor.skill_mp_cost(skill) > 0
change_color(mp_cost_color)
draw_text(rect, actor.skill_mp_cost(skill), 2)
end
end
end