Skip to content
This repository was archived by the owner on Oct 28, 2023. It is now read-only.

Commit fa3936b

Browse files
committed
2 parents fed1915 + 57b4691 commit fa3936b

File tree

1 file changed

+22
-15
lines changed

1 file changed

+22
-15
lines changed

esp32/modules/launcher.py

Lines changed: 22 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,27 @@
88

99
ugfx.init()
1010
ugfx.input_init()
11-
11+
ugfx.clear(ugfx.BLACK)
12+
ugfx.flush()
1213
ugfx.clear(ugfx.WHITE)
13-
ugfx.string(180,25,"STILL","Roboto_BlackItalic24",ugfx.BLACK)
14-
ugfx.string(160,50,"Hacking","PermanentMarker22",ugfx.BLACK)
14+
ugfx.flush()
15+
16+
ugfx.string_box(148,22,148,26, "STILL", "Roboto_BlackItalic24", ugfx.BLACK, ugfx.justifyCenter)
17+
ugfx.string_box(148,45,148,23, "Hacking", "PermanentMarker22", ugfx.BLACK, ugfx.justifyCenter)
18+
ugfx.string_box(148,70,148,26, "Anyway", "Roboto_BlackItalic24", ugfx.BLACK, ugfx.justifyCenter)
19+
20+
#the line under the text
1521
str_len = ugfx.get_string_width("Hacking","PermanentMarker22")
16-
ugfx.line(160, 72, 174 + str_len, 72, ugfx.BLACK)
17-
ugfx.line(170 + str_len, 52, 170 + str_len, 70, ugfx.BLACK)
18-
ugfx.string(170,75,"Anyway","Roboto_BlackItalic24",ugfx.BLACK)
19-
ugfx.string(155,105,"MOTD: NVS","Roboto_Regular18",ugfx.BLACK)
22+
line_begin = 148 + int((148-str_len)/2)
23+
line_end = str_len+line_begin
24+
ugfx.line(line_begin, 68, line_end, 68, ugfx.BLACK)
25+
26+
#the cursor past the text
27+
cursor_pos = line_end+5
28+
ugfx.line(cursor_pos, 46, cursor_pos, 66, ugfx.BLACK)
2029

30+
ugfx.string_box(148,110,148,18, "Spaanse Spook","Roboto_Regular18",ugfx.BLACK, ugfx.justifyLeft)
31+
ugfx.flush()
2132
options = None
2233
install_path = None
2334

@@ -35,19 +46,15 @@ def populate_it():
3546

3647
for app in apps:
3748
options.add_item(app)
38-
39-
options.add_item('setup')
40-
options.add_item('sponsors')
41-
4249

4350
def run_it(pushed):
4451
if (pushed):
4552
selected = options.selected_text()
4653
options.destroy()
4754

4855
ugfx.clear(ugfx.BLACK)
49-
ugfx.string(40,25,"Running:","Roboto_BlackItalic24",ugfx.WHITE)
50-
ugfx.string(100,75, selected,"PermanentMarker22",ugfx.WHITE)
56+
ugfx.string_box(0, 25, 296, 25,"Running:","Roboto_BlackItalic24",ugfx.WHITE, ugfx.justifyCenter)
57+
ugfx.string_box(0, 51, 296, 23, selected, "PermanentMarker22", ugfx.WHITE, ugfx.justifyCenter)
5158
ugfx.flush()
5259
badge.eink_busy_wait()
5360
appglue.start_app(selected)
@@ -81,8 +88,8 @@ def uninstall_it(pushed):
8188
print(uninstall)
8289
if uninstall:
8390
ugfx.clear(ugfx.BLACK)
84-
ugfx.string(40,25,"Uninstalling:","Roboto_BlackItalic24",ugfx.WHITE)
85-
ugfx.string(100,75, selected,"PermanentMarker22",ugfx.WHITE)
91+
ugfx.string_box(0, 25, 296, 25,"Uninstalling:","Roboto_BlackItalic24",ugfx.WHITE, ugfx.justifyCenter)
92+
ugfx.string_box(0, 51, 296, 23, selected, "PermanentMarker22", ugfx.WHITE, ugfx.justifyCenter)
8693
ugfx.flush()
8794
install_path = get_install_path()
8895
for rm_file in os.listdir("%s/%s" % (install_path, selected)):

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy