Added pi remember option

This commit is contained in:
Blue Fox 2023-10-14 16:18:47 +02:00
parent 71a84b1d6f
commit efb94d7855
6 changed files with 54 additions and 6 deletions

47
memorytrainer.app.js Normal file → Executable file
View File

@ -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) {

0
memorytrainer.icons.json Normal file → Executable file
View File

0
memorytrainer.info Normal file → Executable file
View File

0
memorytrainer.launcher.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

0
memorytrainer.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

13
pi.memorytrainer.js Executable file
View File

@ -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 };
})();