Skip to content

Commit f26b651

Browse files
Added a color preview for the bg color
I'll add one for the grnd color soon
1 parent 7a0de80 commit f26b651

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

src/main.rs

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1731,6 +1731,25 @@ async fn main() {
17311731
&font
17321732
);
17331733

1734+
match (bg_red.parse::<u8>(), bg_green.parse::<u8>(), bg_blue.parse::<u8>()) {
1735+
(Ok(bg_red), Ok(bg_green), Ok(bg_blue)) => {
1736+
draw_rectangle(
1737+
screen_width() - 450.0,
1738+
10.0,
1739+
50.0,
1740+
50.0,
1741+
Color::from_rgba(
1742+
bg_red,
1743+
bg_green,
1744+
bg_blue,
1745+
255
1746+
)
1747+
);
1748+
}
1749+
1750+
_ => {}
1751+
}
1752+
17341753
bg_red_textbox.draw(bg_red.clone(), &font);
17351754
bg_green_textbox.draw(bg_green.clone(), &font);
17361755
bg_blue_textbox.draw(bg_blue.clone(), &font);

0 commit comments

Comments
 (0)