menu: redesigned name scroller & menu rendering (#3837)

Signed-off-by: Janar Sööt <janar.soot@gmail.com>
This commit is contained in:
Janar Sööt 2021-02-20 18:31:03 +02:00 committed by GitHub
parent 7e21350989
commit 5a7fbe671e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 95 additions and 93 deletions

View file

@ -226,6 +226,7 @@ class PrinterLCD:
else:
# write glyph
pos += self.lcd_chip.write_glyph(pos, row, text)
return pos
def draw_progress_bar(self, row, col, width, value):
pixels = -1 << int(width * 8 * (1. - value) + .5)
pixels |= (1 << (width * 8 - 1)) | 1