Skip to content

Commit 57110f0

Browse files
authored
Merge pull request #1682 from FoamyGuy/snowglobe_cp7
snowglobe cp7 updates and background fix
2 parents bccafbe + aafe94d commit 57110f0

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

TFT_Gizmo_Snowglobe/snowglobe_fancy.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
bitmap=displayio.Bitmap,
3434
palette=displayio.Palette)
3535
# Or just use solid color
36-
except (OSError, TypeError):
36+
except (OSError, TypeError, AttributeError):
3737
BACKGROUND = BACKGROUND if isinstance(BACKGROUND, int) else 0x000000
3838
bg_bitmap = displayio.Bitmap(display.width, display.height, 1)
3939
bg_palette = displayio.Palette(1)
@@ -52,7 +52,7 @@
5252
break
5353
NUM_SPRITES = flake_bitmap.width // FLAKE_WIDTH * flake_bitmap.height // FLAKE_HEIGHT
5454
flake_pos = [0.0] * NUM_FLAKES
55-
flakes = displayio.Group(max_size=NUM_FLAKES)
55+
flakes = displayio.Group()
5656
for _ in range(NUM_FLAKES):
5757
flakes.append(displayio.TileGrid(flake_bitmap, pixel_shader=flake_palette,
5858
width = 1,

TFT_Gizmo_Snowglobe/snowglobe_simple.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
bitmap=displayio.Bitmap,
2727
palette=displayio.Palette)
2828
# Or just use solid color
29-
except (OSError, TypeError):
29+
except (OSError, TypeError, AttributeError):
3030
BACKGROUND = BACKGROUND if isinstance(BACKGROUND, int) else 0x000000
3131
bg_bitmap = displayio.Bitmap(display.width, display.height, 1)
3232
bg_palette = displayio.Palette(1)
@@ -50,7 +50,7 @@
5050
for i, value in enumerate(FLAKES):
5151
flake_sheet[i] = value
5252
flake_pos = [0.0] * NUM_FLAKES
53-
flakes = displayio.Group(max_size=NUM_FLAKES)
53+
flakes = displayio.Group()
5454
for _ in range(NUM_FLAKES):
5555
flakes.append(displayio.TileGrid(flake_sheet, pixel_shader=palette,
5656
width = 1,

0 commit comments

Comments
 (0)