gpstrek - Change from leftright UI to custom with swipe

pull/2191/head
Martin Boonk 2022-10-19 21:04:46 +02:00
parent 7f886e79c5
commit 81ba4e17fa
1 changed files with 15 additions and 9 deletions

View File

@ -318,16 +318,22 @@ function triangle (x, y, width, height){
];
}
function onSwipe(dir){
if (dir < 0) {
nextScreen();
} else if (dir > 0) {
switchMenu();
} else {
nextScreen();
}
}
function setButtons(){
Bangle.setUI("leftright", (dir)=>{
if (dir < 0) {
nextScreen();
} else if (dir > 0) {
switchMenu();
} else {
nextScreen();
}
});
let options = {
mode: "custom",
swipe: onSwipe
};
Bangle.setUI(options);
}
function getApproxFileSize(name){