mirror of
https://github.com/clockworkpi/PicoCalc.git
synced 2026-03-23 04:22:38 +01:00
Update multi booter
This commit is contained in:
@@ -344,6 +344,22 @@ void draw_rect_spi(int x1, int y1, int x2, int y2, int c) {
|
||||
lcd_spi_raise_cs();
|
||||
}
|
||||
|
||||
//16x6
|
||||
void draw_battery_icon(int x0, int y0, int level) {
|
||||
draw_rect_spi(x0, y0, x0+14, y0+6, WHITE);
|
||||
draw_rect_spi(x0 + 1, y0 + 1, x0+12, y0+5, BLACK);
|
||||
|
||||
// (2x2)
|
||||
draw_rect_spi(x0 + 14, y0 + 2, x0+14+2, y0+2+2, WHITE);
|
||||
|
||||
for (int i = 0; i <= 13; i++) {
|
||||
if (i < level) {
|
||||
draw_rect_spi(x0 + 1 + i * 1, y0 + 1, x0 + 1 + i*1+1, y0+1+4, WHITE);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/******************************************************************************************
|
||||
Print a char on the LCD display
|
||||
Any characters not in the font will print as a space.
|
||||
|
||||
@@ -123,7 +123,7 @@ void draw_rect_spi(int x1, int y1, int x2, int y2, int c);
|
||||
void define_region_spi(int xstart, int ystart, int xend, int yend, int rw);
|
||||
void draw_line_spi(int x1, int y1, int x2, int y2, int color);
|
||||
void lcd_print_string_color(char *s, int fg, int bg);
|
||||
|
||||
void draw_battery_icon(int x0, int y0, int level);
|
||||
//Print the bitmap of a char on the video output
|
||||
// x, y - the top left of the char
|
||||
// width, height - size of the char's bitmap
|
||||
|
||||
Reference in New Issue
Block a user