File tree Expand file tree Collapse file tree 3 files changed +7
-11
lines changed Expand file tree Collapse file tree 3 files changed +7
-11
lines changed Original file line number Diff line number Diff line change 3
3
0.03: Add settings to configure prompt
4
4
0.04: Minor code improvements
5
5
0.05: Comment out unused function in settings.js
6
+ 0.06: Changed to use E.showMessage() instead of g.drawString() to display power off message. Looks better and is more coherent.
Original file line number Diff line number Diff line change @@ -19,26 +19,21 @@ if (showPrompt) {
19
19
setTimeout ( load , 100 ) ;
20
20
return ;
21
21
}
22
- g . setFont ( "6x8" , 2 ) . setFontAlign ( 0 , 0 ) ;
23
- var x = g . getWidth ( ) / 2 ;
24
- var y = g . getHeight ( ) / 2 + 10 ;
25
- g . drawString ( "Powering off..." , x , y ) ;
22
+
23
+ E . showMessage ( "Powering off..." ) ;
26
24
27
25
setTimeout ( function ( ) {
28
26
if ( Bangle . softOff ) Bangle . softOff ( ) ; else Bangle . off ( ) ;
29
27
} , 1000 ) ;
30
28
} ) ;
31
29
} else {
32
- g . setFont ( "6x8" , 2 ) . setFontAlign ( 0 , 0 ) ;
33
- var x = g . getWidth ( ) / 2 ;
34
- var y = g . getHeight ( ) / 2 + 10 ;
35
- g . drawString ( "Powering off..." , x , y ) ;
36
-
30
+ E . showMessage ( "Powering off..." ) ;
31
+
37
32
setTimeout ( function ( ) {
38
33
if ( Bangle . softOff ) Bangle . softOff ( ) ; else Bangle . off ( ) ;
39
34
} , 1000 ) ;
40
35
}
41
36
42
37
Bangle . loadWidgets ( ) ;
43
38
Bangle . drawWidgets ( ) ;
44
- }
39
+ }
Original file line number Diff line number Diff line change 1
1
{ "id" : " poweroff" ,
2
2
"name" : " Poweroff" ,
3
3
"shortName" :" Poweroff" ,
4
- "version" : " 0.05 " ,
4
+ "version" : " 0.06 " ,
5
5
"description" : " Simple app to power off your Bangle.js" ,
6
6
"icon" : " app.png" ,
7
7
"tags" : " tool,poweroff,shutdown" ,
You can’t perform that action at this time.
0 commit comments