1
0
Fork 0

Minor changes

master
David Peer 2022-04-03 13:57:05 +02:00
parent 32e377941a
commit 4c2b77a5fb
2 changed files with 16 additions and 3 deletions

View File

@ -5,7 +5,7 @@
## Features
- Fullscreen on/off
- The design is adapted to the theme of your bangle.
- Tab in middle of screen to show between different information.
- Tab left/right of screen to show steps, temperature etc.
- Enable / disable lock icon in the settings.
- If the "alarm" app is installed tab top / bottom of the screen to set the timer.

View File

@ -341,9 +341,13 @@ Bangle.on('lock', function(isLocked) {
});
Bangle.on('touch', function(btn, e){
var left = parseInt(g.getWidth() * 0.2);
var right = g.getWidth() - left;
var upper = parseInt(g.getHeight() * 0.2);
var lower = g.getHeight() - upper;
var is_left = e.x < left;
var is_right = e.x > right;
var is_upper = e.y < upper;
var is_lower = e.y > lower;
@ -359,9 +363,18 @@ Bangle.on('touch', function(btn, e){
draw(true);
}
if(!is_lower && !is_upper){
var maxInfo = 6;
if(is_right){
Bangle.buzz(40, 0.6);
settings.showInfo = (settings.showInfo+1) % 6;
settings.showInfo = (settings.showInfo+1) % maxInfo;
storage.write(SETTINGS_FILE, settings);
draw(true);
}
if(is_left){
Bangle.buzz(40, 0.6);
settings.showInfo = settings.showInfo-1;
settings.showInfo = settings.showInfo < 0 ? maxInfo-1 : settings.showInfo;
storage.write(SETTINGS_FILE, settings);
draw(true);
}