def draw_shu(x, y, width, rate, color1, color2) fill_w = (width * rate).to_i gauge_y = y + line_height - 8 contents.fill_rect(x, gauge_y, 6, width, gauge_back_color) contents.gradient_fill_rect(x, gauge_y, 6, fill_w, color1, color2) end
def draw_shu(x, y, width, rate, color1, color2)
fill_w = (width * rate).to_i
gauge_y = y + line_height - 8
contents.fill_rect(x, gauge_y, 6, width, gauge_back_color)
contents.gradient_fill_rect(x, gauge_y, 6, fill_w, color1, color2)
end
这段放到window_base里面,进度条脚本第79行draw_gauge改成draw_shu,第21、23行调整窗口WIDTH、HEIGHT即可 |