Merge pull request #556 from jedgarpark/pyportal-event-countdown

aio time, label for text
This commit is contained in:
Limor "Ladyada" Fried 2019-03-12 01:21:04 -04:00 committed by GitHub
commit aef29bb13c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 5 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 225 KiB

After

Width:  |  Height:  |  Size: 150 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 225 KiB

After

Width:  |  Height:  |  Size: 150 KiB

View file

@ -7,7 +7,7 @@ import time
import board
from adafruit_pyportal import PyPortal
from adafruit_bitmap_font import bitmap_font
from adafruit_display_text.text_area import TextArea
from adafruit_display_text.label import Label
# The time of the thing!
EVENT_YEAR = 2019
@ -32,14 +32,14 @@ big_font = bitmap_font.load_font(cwd+"/fonts/Helvetica-Bold-36.bdf")
big_font.load_glyphs(b'0123456789') # pre-load glyphs for fast printing
event_background = cwd+"/countdown_event.bmp"
days_position = (10, 175)
hours_position = (110, 175)
minutes_position = (220, 175)
days_position = (8, 207)
hours_position = (113, 207)
minutes_position = (225, 207)
text_color = 0xFFFFFF
text_areas = []
for pos in (days_position, hours_position, minutes_position):
textarea = TextArea(big_font, text=' ')
textarea = Label(big_font, text=' ')
textarea.x = pos[0]
textarea.y = pos[1]
textarea.color = text_color