We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2de4173 commit 8f330e4Copy full SHA for 8f330e4
src/code.py
@@ -186,6 +186,7 @@
186
}
187
188
cell_width = WIDTH // config["width"]
189
+page_size = config["width"] * config["height"]
190
191
default_icon_bmp, default_icon_palette = adafruit_imageload.load("launcher_assets/default_icon.bmp")
192
default_icon_palette.make_transparent(0)
@@ -562,7 +563,7 @@ def handle_key_press(key):
562
563
print("left click")
564
clicked_cell = menu_grid.which_cell_contains((mouse_tg.x, mouse_tg.y))
565
if clicked_cell is not None:
- index = clicked_cell[1] * config["width"] + clicked_cell[0]
566
+ index = (clicked_cell[1] * config["width"] + clicked_cell[0]) + (cur_page * page_size)
567
568
if right_tg.contains((mouse_tg.x, mouse_tg.y, 0)):
569
page_right()
0 commit comments