Added pi remember option
This commit is contained in:
parent
71a84b1d6f
commit
efb94d7855
47
memorytrainer.app.js
Normal file → Executable file
47
memorytrainer.app.js
Normal file → Executable file
@ -37,12 +37,45 @@ function animate100x100img_big2small(img, minscale, maxscale) {
|
|||||||
|
|
||||||
function homescreen() {
|
function homescreen() {
|
||||||
g.clear();
|
g.clear();
|
||||||
if(moduleList.length == 0) {
|
var boolean = false;
|
||||||
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=")});
|
var number = 50;
|
||||||
wait(5);
|
|
||||||
Bangle.showLauncher();
|
// Main menu
|
||||||
}
|
var mainmenu = {
|
||||||
E.showMessage(":/\nModules aren't implemented yet.\nSee you soon!", "COMING SOON");
|
"" : { 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() {
|
function setupWizard() {
|
||||||
@ -87,6 +120,8 @@ function welcome(new_user) {
|
|||||||
|
|
||||||
// now the real code begins
|
// now the real code begins
|
||||||
var settings = getSettings();
|
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);
|
animate100x100img_big2small(storage.read("memorytrainer.png"), 0.1, 1.5);
|
||||||
if(settings.firstrun) {
|
if(settings.firstrun) {
|
||||||
|
0
memorytrainer.icons.json
Normal file → Executable file
0
memorytrainer.icons.json
Normal file → Executable file
0
memorytrainer.info
Normal file → Executable file
0
memorytrainer.info
Normal file → Executable file
0
memorytrainer.launcher.png
Normal file → Executable file
0
memorytrainer.launcher.png
Normal file → Executable file
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
0
memorytrainer.png
Normal file → Executable file
0
memorytrainer.png
Normal file → Executable file
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
13
pi.memorytrainer.js
Executable file
13
pi.memorytrainer.js
Executable 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 };
|
||||||
|
})();
|
Reference in New Issue
Block a user