diff --git a/memorytrainer.app.js b/memorytrainer.app.js old mode 100644 new mode 100755 index be6eebb..c9a6795 --- a/memorytrainer.app.js +++ b/memorytrainer.app.js @@ -37,12 +37,45 @@ function animate100x100img_big2small(img, minscale, maxscale) { function homescreen() { 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"); + var boolean = false; + var number = 50; + + // Main menu + var mainmenu = { + "" : { title : "What to do?" }, + "Learn Pi, 3.141592" : () => { E.showMenu(pimenu); }, + "----": () => {}, + "Exit": () => { Bangle.showLauncher(); }, // remove the menu + }; + + // Pi-Menu + var pimenu = { + "" : "3.1415926535", "< Back": () => { E.showMenu(mainmenu); }, + "------": undefined, + "001-020": () => { E.showPrompt("1415926535", { "title": "001-020", "buttons": {"< Back": true} }).then(function(v) { showMenu(pimenu); }); }, + "021-040": () => { }, + "041-060": () => { }, + "061-080": () => { }, + "081-100": () => { }, + "101-120": () => { }, + "121-140": () => { }, + "141-160": () => { }, + "161-180": () => { }, + "181-200": () => { }, + "201-220": () => { }, + "221-240": () => { }, + "241-260": () => { }, + "261-280": () => { }, + "281-300": () => { }, + "301-320": () => { }, + "321-340": () => { }, + "341-360": () => { }, + "361-380": () => { }, + "381-400": () => { } + }; + + // Actually display the menu + E.showMenu(mainmenu); } function setupWizard() { @@ -87,6 +120,8 @@ function welcome(new_user) { // now the real code begins var settings = getSettings(); +var currentModule = 0; +var moduleInterval; // interval for the modules to be called animate100x100img_big2small(storage.read("memorytrainer.png"), 0.1, 1.5); if(settings.firstrun) { diff --git a/memorytrainer.icons.json b/memorytrainer.icons.json old mode 100644 new mode 100755 diff --git a/memorytrainer.info b/memorytrainer.info old mode 100644 new mode 100755 diff --git a/memorytrainer.launcher.png b/memorytrainer.launcher.png old mode 100644 new mode 100755 diff --git a/memorytrainer.png b/memorytrainer.png old mode 100644 new mode 100755 diff --git a/pi.memorytrainer.js b/pi.memorytrainer.js new file mode 100755 index 0000000..8ecb9d8 --- /dev/null +++ b/pi.memorytrainer.js @@ -0,0 +1,13 @@ +(() => { + +function drawFace(ret) { + if(!ret) { + g.clear(); + E.showMessage("Testmessage from pi.memorytrainer.js!", "TEST"); + ret = true; + } + return ret; +} + +return { drawFace: drawFace, call_interval: 1000 }; +})();