class Window_Base < Window
#--------------------------------------------------------------------------
# ● 绘制值槽
# rate : 比率(1.0 为满值)
# color1 : 渐变色的左端
# color2 : 渐变色的右端
#--------------------------------------------------------------------------
def draw_gauge(x, y, width, rate, color1, color2)
fill_w = (width * rate).to_i
gauge_y = y + line_height - 8
contents.fill_rect(x, gauge_y, width, 6, gauge_back_color)
contents.gradient_fill_rect(x, gauge_y, fill_w, 6, color1, color2)
end
end
class Window_Base < Window
#--------------------------------------------------------------------------
# ● 绘制值槽
# rate : 比率(1.0 为满值)
# color1 : 渐变色的左端
# color2 : 渐变色的右端
#--------------------------------------------------------------------------
def draw_gauge(x, y, width, rate, color1, color2)
fill_w = (width * rate).to_i
gauge_y = y + line_height - 8
contents.fill_rect(x, gauge_y, width, 6, gauge_back_color)
contents.gradient_fill_rect(x, gauge_y, fill_w, 6, color1, color2)
end
end