8
8
9
9
ugfx .init ()
10
10
ugfx .input_init ()
11
-
11
+ ugfx .clear (ugfx .BLACK )
12
+ ugfx .flush ()
12
13
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
15
21
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 )
20
29
30
+ ugfx .string_box (148 ,110 ,148 ,18 , "Spaanse Spook" ,"Roboto_Regular18" ,ugfx .BLACK , ugfx .justifyLeft )
31
+ ugfx .flush ()
21
32
options = None
22
33
install_path = None
23
34
@@ -35,19 +46,15 @@ def populate_it():
35
46
36
47
for app in apps :
37
48
options .add_item (app )
38
-
39
- options .add_item ('setup' )
40
- options .add_item ('sponsors' )
41
-
42
49
43
50
def run_it (pushed ):
44
51
if (pushed ):
45
52
selected = options .selected_text ()
46
53
options .destroy ()
47
54
48
55
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 )
51
58
ugfx .flush ()
52
59
badge .eink_busy_wait ()
53
60
appglue .start_app (selected )
@@ -81,8 +88,8 @@ def uninstall_it(pushed):
81
88
print (uninstall )
82
89
if uninstall :
83
90
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 )
86
93
ugfx .flush ()
87
94
install_path = get_install_path ()
88
95
for rm_file in os .listdir ("%s/%s" % (install_path , selected )):
0 commit comments