Skip to content

Commit 99b6fd3

Browse files
committed
update the progress bar in the fluent theme
1 parent 498fb74 commit 99b6fd3

File tree

1 file changed

+17
-5
lines changed

1 file changed

+17
-5
lines changed

scripts/draw_downloadprogress/draw_downloadprogress.gml

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,22 @@ function draw_downloadprogress(argument0, argument1, argument2, argument3) {
1717
draw_theme_font(font_main)
1818
draw_set_halign(fa_center)
1919
draw_text_dynamic(floor(rw / 2), y1 + 40, desc)
20-
draw_set_color(10512464)
21-
draw_rectangle(x1 + 30, y1 + 60, x1 + 30 + percent * 240, y1 + 80, 0)
22-
draw_theme_color()
23-
draw_rectangle(x1 + 30, y1 + 60, x1 + 270, y1 + 80, 1)
20+
if (theme = 3) {
21+
draw_theme_color()
22+
draw_line(x1 + 30, y1 + 77, x1 + 270, y1 + 77)
23+
draw_set_color(accent[5])
24+
draw_set_alpha(0.5)
25+
draw_rectangle(x1 + 30, y1 + 77 - 1, x1 + 30 + percent * 240, y1 + 77 + 1, 0)
26+
draw_set_alpha(1)
27+
draw_rectangle(x1 + 30 + 1, y1 + 77 - 1, x1 + 30 + clamp(percent * 240, 1, 239), y1 + 77 + 1, 0)
28+
draw_rectangle(x1 + 30, y1 + 77, x1 + 30 + percent * 240, y1 + 77, 0)
29+
draw_theme_color()
30+
} else {
31+
draw_set_color(10512464)
32+
draw_rectangle(x1 + 30, y1 + 60, x1 + 30 + percent * 240, y1 + 80, 0)
33+
draw_theme_color()
34+
draw_rectangle(x1 + 30, y1 + 60, x1 + 270, y1 + 80, 1)
35+
}
2436
if (percent > 0.5) draw_set_color(c_white)
2537
if (total <= 0) {
2638
done_text = "-.--"
@@ -30,7 +42,7 @@ function draw_downloadprogress(argument0, argument1, argument2, argument3) {
3042
total_text = string_format(total_mb, 0, 2)
3143
}
3244
text = done_text + "/" + total_text + " MB (" + string(round(percent * 100)) + "%)"
33-
draw_text_dynamic(floor(rw / 2), y1 + 65, text)
45+
draw_text_dynamic(floor(rw / 2), y1 + 65 - 5 * (theme = 3), text)
3446
draw_set_halign(fa_left)
3547

3648

0 commit comments

Comments
 (0)