From 13f6751504827de23eef015e9b66ecd6b3752022 Mon Sep 17 00:00:00 2001 From: foamyguy Date: Thu, 21 Aug 2025 11:07:29 -0500 Subject: [PATCH] more narrow arrow buttons. more room for app icon grid. move help text to single row at bottom. remove leftover hardcoded apps list. --- src/code.py | 46 ++++------------------------ src/launcher_assets/arrow_left.bmp | Bin 918 -> 918 bytes src/launcher_assets/arrow_right.bmp | Bin 918 -> 918 bytes 3 files changed, 6 insertions(+), 40 deletions(-) diff --git a/src/code.py b/src/code.py index 8d1b0ed..12382f3 100644 --- a/src/code.py +++ b/src/code.py @@ -146,45 +146,13 @@ if "use_mouse" in launcher_config and launcher_config["use_mouse"]: mouse_buf = array.array("b", [0] * 8) -WIDTH = int(280 / 360 * display.width // scale) +WIDTH = int(298 / 360 * display.width // scale) HEIGHT = int(182 / 200 * display.height // scale) config = { "menu_title": "Launcher Menu", "width": 3, "height": 2, - "apps": [ - { - "title": "🐍Snake🐍", - "icon": "icon_snake.bmp", - "file": "code_snake_game.py" - }, - { - "title": "Nyan😺Flap", - "icon": "icon_flappynyan.bmp", - "file": "code_flappy_nyan.py" - }, - { - "title": "Memory🧠", - "icon": "icon_memory.bmp", - "file": "code_memory.py" - }, - { - "title": "Matrix", - "icon": "/apps/matrix/icon.bmp", - "file": "/apps/matrix/code.py" - }, - { - "title": "Breakout", - "icon": "icon_breakout.bmp", - "file": "code_breakout.py" - }, - { - "title": "Paint🖌️", - "icon": "icon_paint.bmp", - } - - ] } cell_width = WIDTH // config["width"] @@ -371,11 +339,11 @@ if "arrow" in launcher_config["palette"]: left_tg = AnchoredTileGrid(bitmap=left_bmp, pixel_shader=left_palette) left_tg.anchor_point = (0, 0.5) -left_tg.anchored_position = (4, (display.height // 2 // scale) - 2) +left_tg.anchored_position = (0, (display.height // 2 // scale) - 2) right_tg = AnchoredTileGrid(bitmap=right_bmp, pixel_shader=right_palette) right_tg.anchor_point = (1.0, 0.5) -right_tg.anchored_position = ((display.width // scale) - 4, (display.height // 2 // scale) - 2) +right_tg.anchored_position = ((display.width // scale), (display.height // 2 // scale) - 2) original_arrow_btn_color = left_palette[2] scaled_group.append(left_tg) @@ -389,13 +357,11 @@ if mouse: scaled_group.append(mouse_tg) -help_txt = Label(terminalio.FONT, text="[Arrow]: Move\n[E]: Edit\n[Enter]: Run\n[1-9]: Page", +help_txt = Label(terminalio.FONT, text="[Arrow]: Move [E]: Edit [Enter]: Run [1-9]: Page", color=int(launcher_config["palette"].get("fg", "0xffffff"), 16)) -# help_txt = TextBox(terminalio.FONT, width=88, height=30, align=TextBox.ALIGN_RIGHT, background_color=int(launcher_config["palette"].get("accent", "0x008800"), 16), text="[E]: Edit\n[Enter]: Run") -help_txt.anchor_point = (0, 0) -help_txt.anchored_position = (2, 2) -# help_txt.anchored_position = (display.width - 89, 1) +help_txt.anchor_point = (0.0, 1.0) +help_txt.anchored_position = (2, display.height-2) print(help_txt.bounding_box) main_group.append(help_txt) diff --git a/src/launcher_assets/arrow_left.bmp b/src/launcher_assets/arrow_left.bmp index 8a9071c2d0ff9578c88fe05cb35e96474581fc01..30cca9a34c6bb4b288fe169c11b822cfd4baeded 100644 GIT binary patch literal 918 zcmdr~F%H5o3^aj_De1u4`X#6f5)wBH|A%<7K*&{E^a^cd-M3=anxddgD%2u}C^(gDSXFEMQrA zFG>ee**Ztjt;Q0#HKXb!aBJh>dI_A}b)9ncP_8`cXg%=b9Bx!S$M5EFhaB&j-}mG% ZYqi*73moMU7~Hh-&l!%h-3A?F{sMt~Mj-$I literal 918 zcmd5)!41MN3=DxEFNXz!Ct!wtkdXMW3SZ{vIILFA4oPi`4Ib}Z5K;fDVB`Vd* z;LIaf7yrV0)$e*r;G>JCm%!O`bm{Wf3na;h+@ZV^yoDQCxsgBW$Qk&!zX?!XPH^?% otLL#l3OdF6A)mkg<91)aF-vvBsj=FtiQFt2XBG0$<{U)wrOzyJUM diff --git a/src/launcher_assets/arrow_right.bmp b/src/launcher_assets/arrow_right.bmp index 0b47144a6319952ab8932e4f149923ae3f25d930..e0102517c317d78e36e2d9c40dab9b1636e81b17 100644 GIT binary patch literal 918 zcmds#u?@mN3`I?#qdHR1<~#{XgM>trRcM(b6=~J_>C{ ze8aEs8~h+AL>TJ*+1;crUqt+&WV}x=!XKgg(Js~y_IX%T+R#uHhfZrTQw2NX0QJU$ zC>02oeKSX1XXMPmRtUBN**+%<8>7&;Cf3ZgX>va6Q=jN>|0nJR=l4O{`YL?ApigX literal 918 zcmd6l!41MN3`IlW#wlTe)Dtj6FGxsSScNNdbR1SI-*#~v-?$*GB+BdmaopDPZP_P@ z1?v;DVV*H}>3|gh{dCmHR<*Aw=@83&xj$s{#gc<}<%EdWl~-~RkSJxEibbWC9hOp? zm%&74md)RA)w-;ns_)TR3wJCA$71lz25|p;kzp8gWEgo0%*ik;q8`r2{CdB>DE`D& ppD}Nc|HCYMmgij;+39-Bbj7a!jJ2-qx=OJhW4{jVjed^({sytKO`-q*