From e99a03d8e243f8caceb6f5318d66779f02f6c2c6 Mon Sep 17 00:00:00 2001 From: DJ Sundog Date: Sun, 2 Aug 2020 14:41:58 -0700 Subject: [PATCH] enumerate works the other way around --- SoundslabDisplay.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SoundslabDisplay.py b/SoundslabDisplay.py index 67b659d..b9e1e45 100644 --- a/SoundslabDisplay.py +++ b/SoundslabDisplay.py @@ -103,7 +103,7 @@ class SoundslabDisplay: offset_from_top = 61 # start at the 21st row of pixels to draw inside the outer overlay, add 40 to account for the "prev" indicator row font = ImageFont.truetype(font='/usr/share/fonts/truetype/hack/Hack-Bold.ttf', size=14) - for row, idx in enumerate(menu_data["rows"], start=0): + for idx, row in enumerate(menu_data["rows"], start=0): if menu_data["selected"] == idx: menu_overlay.rectangle([(21, offset_from_top),(self.screen_size[0] - 21, offset_from_top + 40)], fg_color) # highlight background for selected menu item