commit
bbeea86eae
|
|
@ -12,3 +12,4 @@
|
||||||
0.11: Merge Bangle.js 1 and 2 launchers, again
|
0.11: Merge Bangle.js 1 and 2 launchers, again
|
||||||
0.12: Add an option to hide clocks from the app list (fix #1015)
|
0.12: Add an option to hide clocks from the app list (fix #1015)
|
||||||
Add /*LANG*/ tags for internationalisation
|
Add /*LANG*/ tags for internationalisation
|
||||||
|
0.13: Add fullscreen mode
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,10 @@ var s = require("Storage");
|
||||||
var scaleval = 1;
|
var scaleval = 1;
|
||||||
var vectorval = 20;
|
var vectorval = 20;
|
||||||
var font = g.getFonts().includes("12x20") ? "12x20" : "6x8:2";
|
var font = g.getFonts().includes("12x20") ? "12x20" : "6x8:2";
|
||||||
let settings = Object.assign({ showClocks: true }, s.readJSON("launch.json", true) || {});
|
let settings = Object.assign({
|
||||||
|
showClocks: true,
|
||||||
|
fullscreen: false
|
||||||
|
}, s.readJSON("launch.json", true) || {});
|
||||||
|
|
||||||
if ("vectorsize" in settings) {
|
if ("vectorsize" in settings) {
|
||||||
vectorval = parseInt(settings.vectorsize);
|
vectorval = parseInt(settings.vectorsize);
|
||||||
|
|
@ -44,8 +47,11 @@ function drawApp(i, r) {
|
||||||
}
|
}
|
||||||
|
|
||||||
g.clear();
|
g.clear();
|
||||||
|
|
||||||
|
if (!settings.fullscreen) {
|
||||||
Bangle.loadWidgets();
|
Bangle.loadWidgets();
|
||||||
Bangle.drawWidgets();
|
Bangle.drawWidgets();
|
||||||
|
}
|
||||||
|
|
||||||
E.showScroller({
|
E.showScroller({
|
||||||
h : 64*scaleval, c : apps.length,
|
h : 64*scaleval, c : apps.length,
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
"id": "launch",
|
"id": "launch",
|
||||||
"name": "Launcher",
|
"name": "Launcher",
|
||||||
"shortName": "Launcher",
|
"shortName": "Launcher",
|
||||||
"version": "0.12",
|
"version": "0.13",
|
||||||
"description": "This is needed to display a menu allowing you to choose your own applications. You can replace this with a customised launcher.",
|
"description": "This is needed to display a menu allowing you to choose your own applications. You can replace this with a customised launcher.",
|
||||||
"icon": "app.png",
|
"icon": "app.png",
|
||||||
"type": "launch",
|
"type": "launch",
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,9 @@
|
||||||
// make sure to enclose the function in parentheses
|
// make sure to enclose the function in parentheses
|
||||||
(function(back) {
|
(function(back) {
|
||||||
let settings = Object.assign({ showClocks: true }, require("Storage").readJSON("launch.json", true) || {});
|
let settings = Object.assign({
|
||||||
|
showClocks: true,
|
||||||
|
fullscreen: false
|
||||||
|
}, require("Storage").readJSON("launch.json", true) || {});
|
||||||
|
|
||||||
let fonts = g.getFonts();
|
let fonts = g.getFonts();
|
||||||
function save(key, value) {
|
function save(key, value) {
|
||||||
|
|
@ -8,7 +11,7 @@
|
||||||
require("Storage").write("launch.json",settings);
|
require("Storage").write("launch.json",settings);
|
||||||
}
|
}
|
||||||
const appMenu = {
|
const appMenu = {
|
||||||
"": {"title": /*LANG*/"Launcher Settings"},
|
"": { "title": /*LANG*/"Launcher" },
|
||||||
/*LANG*/"< Back": back,
|
/*LANG*/"< Back": back,
|
||||||
/*LANG*/"Font": {
|
/*LANG*/"Font": {
|
||||||
value: fonts.includes(settings.font)? fonts.indexOf(settings.font) : fonts.indexOf("12x20"),
|
value: fonts.includes(settings.font)? fonts.indexOf(settings.font) : fonts.indexOf("12x20"),
|
||||||
|
|
@ -16,15 +19,20 @@
|
||||||
onchange: (m) => {save("font", fonts[m])},
|
onchange: (m) => {save("font", fonts[m])},
|
||||||
format: v => fonts[v]
|
format: v => fonts[v]
|
||||||
},
|
},
|
||||||
/*LANG*/"Vector font size": {
|
/*LANG*/"Vector Font Size": {
|
||||||
value: settings.vectorsize || 10,
|
value: settings.vectorsize || 10,
|
||||||
min:10, max: 20,step:1,wrap:true,
|
min:10, max: 20,step:1,wrap:true,
|
||||||
onchange: (m) => {save("vectorsize", m)}
|
onchange: (m) => {save("vectorsize", m)}
|
||||||
},
|
},
|
||||||
/*LANG*/"Show clocks": {
|
/*LANG*/"Show Clocks": {
|
||||||
value: settings.showClocks == true,
|
value: settings.showClocks == true,
|
||||||
format: v => v ? /*LANG*/"Yes" : /*LANG*/"No",
|
format: v => v ? /*LANG*/"Yes" : /*LANG*/"No",
|
||||||
onchange: (m) => { save("showClocks", m) }
|
onchange: (m) => { save("showClocks", m) }
|
||||||
|
},
|
||||||
|
/*LANG*/"Fullscreen": {
|
||||||
|
value: settings.fullscreen == true,
|
||||||
|
format: v => v ? /*LANG*/"Yes" : /*LANG*/"No",
|
||||||
|
onchange: (m) => { save("fullscreen", m) }
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
E.showMenu(appMenu);
|
E.showMenu(appMenu);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue