# Create a TileGrid to hold the bitmap bg_tile_grid = displayio.TileGrid( bg_bitmap, pixel_shader=getattr(bg_bitmap, "pixel_shader", displayio.ColorConverter()), ) # add it to the group that is showing main_group.append(bg_tile_grid) # grid to hold the icons layout = GridLayout( x=0, y=0, width=320, height=240, grid_size=(4, 3), cell_padding=20, ) # initialize the icons in the grid for i, icon in enumerate(_icons): icon_widget = IconWidget( icon[0], icon[1], x=0, y=0, on_disk=True, transparent_index=0, label_background=0x888888, )
macropad.pixels.brightness = 0.1 for i in range(12): macropad.pixels[i] = (keymap[i][0]) main_group = displayio.Group() macropad.display.show(main_group) title = label.Label( y=4, font=terminalio.FONT, color=0x0, text=" -Minecraft Turbopad- ", background_color=0xFFFFFF, ) layout = GridLayout(x=0, y=13, width=128, height=54, grid_size=(3, 4), cell_padding=5) label_text = [ "CREATE", "SURVIV", "SAY", "DAY", "NIGHT", "KILL", "CLEAR", "RAIN", "THUNDR", "BEE", "MINE", "SOUND",