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

Commit ce7d979

Browse files
authored
Merge pull request SHA2017-badge#107 from SHA2017-badge/badge-UXfixes
Launcher UX fixes
2 parents 2184f01 + 30d5576 commit ce7d979

File tree

2 files changed

+17
-8
lines changed

2 files changed

+17
-8
lines changed

esp32/modules/installer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
ugfx.string(140,75, "WiFi","PermanentMarker22",ugfx.WHITE)
1515
ugfx.flush()
1616

17-
timeout = 500
17+
timeout = 250
1818
while not wifi.sta_if.isconnected():
1919
time.sleep(0.1)
2020
timeout = timeout - 1

esp32/modules/launcher.py

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,22 +14,29 @@
1414
ugfx.clear(ugfx.WHITE)
1515
ugfx.flush()
1616

17-
ugfx.string_box(148,22,148,26, "STILL", "Roboto_BlackItalic24", ugfx.BLACK, ugfx.justifyCenter)
18-
ugfx.string_box(148,45,148,23, "Hacking", "PermanentMarker22", ugfx.BLACK, ugfx.justifyCenter)
19-
ugfx.string_box(148,70,148,26, "Anyway", "Roboto_BlackItalic24", ugfx.BLACK, ugfx.justifyCenter)
17+
ugfx.string_box(148,0,148,26, "STILL", "Roboto_BlackItalic24", ugfx.BLACK, ugfx.justifyCenter)
18+
ugfx.string_box(148,23,148,23, "Hacking", "PermanentMarker22", ugfx.BLACK, ugfx.justifyCenter)
19+
ugfx.string_box(148,48,148,26, "Anyway", "Roboto_BlackItalic24", ugfx.BLACK, ugfx.justifyCenter)
2020

2121
#the line under the text
2222
str_len = ugfx.get_string_width("Hacking","PermanentMarker22")
2323
line_begin = 148 + int((148-str_len)/2)
2424
line_end = str_len+line_begin
25-
ugfx.line(line_begin, 68, line_end, 68, ugfx.BLACK)
25+
ugfx.line(line_begin, 46, line_end, 46, ugfx.BLACK)
2626

2727
#the cursor past the text
2828
cursor_pos = line_end+5
29-
ugfx.line(cursor_pos, 46, cursor_pos, 66, ugfx.BLACK)
29+
ugfx.line(cursor_pos, 22, cursor_pos, 44, ugfx.BLACK)
3030

31-
ugfx.string_box(148,110,148,18, version.name,"Roboto_Regular12",ugfx.BLACK, ugfx.justifyLeft)
32-
ugfx.flush()
31+
# Instructions
32+
ugfx.line(148, 78, 296, 78, ugfx.BLACK)
33+
ugfx.string_box(148,78,148,18, " A: Run", "Roboto_Regular12", ugfx.BLACK, ugfx.justifyLeft)
34+
ugfx.string_box(148,78,148,18, " B: Uninstall", "Roboto_Regular12", ugfx.BLACK, ugfx.justifyRight)
35+
ugfx.string_box(148,92,148,18, " START: Return to home", "Roboto_Regular12", ugfx.BLACK, ugfx.justifyLeft)
36+
ugfx.line(148, 110, 296, 110, ugfx.BLACK)
37+
ugfx.string_box(148,110,148,18, " " + version.name, "Roboto_Regular12", ugfx.BLACK, ugfx.justifyLeft)
38+
39+
# ugfx.flush()
3340
options = None
3441
install_path = None
3542

@@ -107,6 +114,8 @@ def perform_uninstall(ok):
107114
ugfx.input_attach(ugfx.JOY_UP, lambda pushed: ugfx.flush() if pushed else 0)
108115
ugfx.input_attach(ugfx.JOY_DOWN, lambda pushed: ugfx.flush() if pushed else 0)
109116

117+
ugfx.input_attach(ugfx.BTN_START, lambda pushed: appglue.start_app("") if pushed else 0)
118+
110119
ugfx.set_lut(ugfx.LUT_FULL)
111120
ugfx.flush()
112121
ugfx.set_lut(ugfx.LUT_FASTER)

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