support other modes

This commit is contained in:
2026-06-25 23:45:40 -04:00
parent e5ef73a19a
commit dd9343c59f
3 changed files with 21 additions and 9 deletions
+2 -7
View File
@@ -1,8 +1,8 @@
import requests
import utils.logos as logos
from PIL import Image, ImageDraw
from PIL import Image
from rgbmatrix import graphics
from utils.vars import Colors, font, font_small
from utils.vars import Colors, font, font_small, PANEL_WIDTH, PANEL_HEIGHT, GAME_WIDTH, DIVIDER_COLOR
from time import time
# --- State ---
@@ -25,11 +25,6 @@ _tick = 0
_virtual_canvas = None # PIL Image of the full wide render
_virtual_dirty = True # rebuild the virtual canvas on next frame
PANEL_WIDTH = 256 # 4 × 64px panels
PANEL_HEIGHT = 32
GAME_WIDTH = 128 # each game slot is one panel wide
DIVIDER_COLOR = (40, 40, 40)
# --- Color helpers ---
def _rbg(color_tuple):
"""Convert an (R, G, B) tuple to a graphics.Color with G and B swapped