@@ -130,7 +130,7 @@ def is_tile_moveable(tile_coords):
130
130
)
131
131
132
132
# Create a Group to hold the sprite and castle
133
- group = displayio .Group (max_size = 33 )
133
+ group = displayio .Group ()
134
134
135
135
# Add castle to the group
136
136
group .append (castle )
@@ -430,7 +430,8 @@ def draw_camera_view():
430
430
def show_splash (new_text , color , vertical_offset = 18 ):
431
431
text_area .text = ""
432
432
text_area .text = new_text
433
- text_area .y = round (text_area .text .count ("\n " ) * vertical_offset / 2 )
433
+ text_area .anchor_point = (0 , 0 )
434
+ text_area .anchored_position = (0 , vertical_offset )
434
435
text_area .color = color
435
436
group .append (splash )
436
437
@@ -440,16 +441,20 @@ def show_splash(new_text, color, vertical_offset=18):
440
441
"tilegame_assets/game_message_background.bmp" , "rb"
441
442
) as game_message_background :
442
443
# Make the splash context
443
- splash = displayio .Group (max_size = 4 )
444
+ splash = displayio .Group ()
444
445
446
+ # CircuitPython 6 & 7 compatible
445
447
odb = displayio .OnDiskBitmap (game_message_background )
446
-
447
448
bg_grid = displayio .TileGrid (odb , pixel_shader = getattr (odb , 'pixel_shader' , displayio .ColorConverter ()))
448
449
450
+ # # CircuitPython 7+ compatible
451
+ # odb = displayio.OnDiskBitmap("tilegame_assets/game_message_background.bmp")
452
+ # bg_grid = displayio.TileGrid(odb, pixel_shader=odb.pixel_shader)
453
+
449
454
splash .append (bg_grid )
450
455
451
456
# Text for the message
452
- text_group = displayio .Group (max_size = 8 , scale = 1 , x = 14 , y = 18 )
457
+ text_group = displayio .Group (x = 14 , y = 8 )
453
458
text_area = label .Label (terminalio .FONT , text = " " * 180 , color = 0xD39AE5 )
454
459
text_group .append (text_area )
455
460
splash .append (text_group )
@@ -625,7 +630,7 @@ def show_splash(new_text, color, vertical_offset=18):
625
630
GAME_STATE ["STATE" ] = STATE_WAITING
626
631
random_fact = random .choice (FACTS )
627
632
minerva_txt = wrap_nicely ("Minerva: {}" .format (random_fact ), 23 )
628
- show_splash (minerva_txt , 0xD39AE5 , 10 )
633
+ show_splash (minerva_txt , 0xD39AE5 , 0 )
629
634
630
635
# store the last update time
631
636
last_update_time = now
0 commit comments