Added fundamental structure for modules
This commit is contained in:
parent
973087d19a
commit
71a84b1d6f
@ -4,7 +4,8 @@ g.clear();
|
|||||||
|
|
||||||
// constants
|
// constants
|
||||||
const settingsfile = "memorytrainer.settings.json";
|
const settingsfile = "memorytrainer.settings.json";
|
||||||
|
const moduleList = [];
|
||||||
|
storage.list(/\.memorytrainer\.js$/).forEach(module => moduleList.push(eval(storage.read(module))));
|
||||||
|
|
||||||
// utilities
|
// utilities
|
||||||
function wait(s) {
|
function wait(s) {
|
||||||
@ -36,6 +37,12 @@ function animate100x100img_big2small(img, minscale, maxscale) {
|
|||||||
|
|
||||||
function homescreen() {
|
function homescreen() {
|
||||||
g.clear();
|
g.clear();
|
||||||
|
if(moduleList.length == 0) {
|
||||||
|
E.showMessage("No module to load.\nExiting...", {"title": "ERROR", "img": atob("FBQBAfgAf+Af/4P//D+fx/n+f5/v+f//n//5//+f//n////3//5/n+P//D//wf/4B/4AH4A=")});
|
||||||
|
wait(5);
|
||||||
|
Bangle.showLauncher();
|
||||||
|
}
|
||||||
|
E.showMessage(":/\nModules aren't implemented yet.\nSee you soon!", "COMING SOON");
|
||||||
}
|
}
|
||||||
|
|
||||||
function setupWizard() {
|
function setupWizard() {
|
||||||
|
Reference in New Issue
Block a user