Create settings.js

master
t0m1o1 2021-11-22 02:52:13 +00:00 committed by GitHub
parent 333a646559
commit 374fa668e3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 18 additions and 0 deletions

18
apps/launch/settings.js Normal file
View File

@ -0,0 +1,18 @@
// make sure to enclose the function in parentheses
(function(back) {
let settings = require('Storage').readJSON('launch.json',1)||{};
function save(key, value) {
settings[key] = value;
require('Storage').write('launch.json',settings);
}
const appMenu = {
'': {'title': 'Launcher Settings'},
'< Back': back,
'Scale Value': {
value: settings.scaleval,
min:0.1,max:2,step:0.05,wrap:true,
onchange: (m) => {save('scaleval', m)}
}
};
E.showMenu(appMenu)
})