1
0
Fork 0

Merge pull request #2639 from thyttan/quicklaunch

[quicklaunch] add hints to extension app
master
Gordon Williams 2023-03-10 08:40:24 +00:00 committed by GitHub
commit 810b419abf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 35 additions and 10 deletions

View File

@ -9,3 +9,4 @@
0.09: Do not react if clkinfo is focused
0.10: Extend the functionality via a quicklaunch.app.js file that can be launched
with quicklaunch itself.
0.11: Add hints to the extension app. Tweak remove function.

View File

@ -21,11 +21,13 @@
if (ud == 1 && settings.extdownapp && settings.extdownapp.src){ if (settings.extdownapp.name == "Show Launcher") Bangle.showLauncher(); else if (!storage.read(settings.extdownapp.src)) reset("extdownapp"); else load(settings.extdownapp.src); }
};
let removeUI = ()=>{if (timeoutToClock) clearTimeout(timeoutToClock);}
Bangle.setUI({
mode: "custom",
mode: "custom",
touch: touchHandler,
swipe : swipeHandler,
remove: ()=>{if (timeoutToClock) clearTimeout(timeoutToClock);} // Compatability with Fastload Utils.
remove: removeUI // Compatability with Fastload Utils.
});
g.clearRect(Bangle.appRect);
@ -36,7 +38,14 @@
const updateTimeoutToClock = function(){
let time = 1000; // milliseconds
if (timeoutToClock) clearTimeout(timeoutToClock);
timeoutToClock = setTimeout(load,time);
timeoutToClock = setTimeout(load,time);
};
updateTimeoutToClock();
let R = Bangle.appRect;
g.setFont("Vector", 11)
.setFontAlign(0,1,0).drawString(settings.extupapp.name, R.x+R.w/2, R.y2)
.setFontAlign(0,1,1).drawString(settings.extrightapp.name, R.x, R.y+R.h/2)
.setFontAlign(0,-1,0).drawString(settings.extdownapp.name, R.x+R.w/2, R.y)
.setFontAlign(0,1,3).drawString(settings.extleftapp.name, R.x2, R.y+R.h/2);
}

View File

@ -2,16 +2,31 @@
"id": "quicklaunch",
"name": "Quick Launch",
"icon": "app.png",
"version": "0.10",
"version": "0.11",
"description": "Tap or swipe left/right/up/down on your clock face to launch up to five apps of your choice. Configurations can be accessed through Settings->Apps.",
"type": "bootloader",
"tags": "tools, system",
"readme": "README.md",
"supports": ["BANGLEJS2"],
"storage": [
{"name": "quicklaunch.settings.js", "url": "settings.js"},
{"name": "quicklaunch.boot.js", "url": "boot.js"},
{"name": "quicklaunch.app.js", "url": "app.js"}
"supports": [
"BANGLEJS2"
],
"data": [{"name": "quicklaunch.json"}]
"storage": [
{
"name": "quicklaunch.settings.js",
"url": "settings.js"
},
{
"name": "quicklaunch.boot.js",
"url": "boot.js"
},
{
"name": "quicklaunch.app.js",
"url": "app.js"
}
],
"data": [
{
"name": "quicklaunch.json"
}
]
}