mirror of https://github.com/espruino/BangleApps
Merge branch 'espruino:master' into master
commit
7581201c84
|
@ -105,7 +105,8 @@ if (!date.toLocalISOString) boot += `Date.prototype.toLocalISOString = function(
|
|||
// show timings
|
||||
if (DEBUG) boot += `print(".boot0",0|(Date.now()-_tm),"ms");_tm=Date.now();\n`
|
||||
// ================================================== BOOT.JS
|
||||
// Append *.boot.js files
|
||||
// Append *.boot.js files.
|
||||
// Name files with a number - eg 'foo.5.boot.js' to enforce order (lowest first). Numbered files get placed before non-numbered
|
||||
// These could change bleServices/bleServiceOptions if needed
|
||||
let bootFiles = require('Storage').list(/\.boot\.js$/).sort((a,b)=>{
|
||||
let getPriority = /.*\.(\d+)\.boot\.js$/;
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
0.01: First release of clock with faces for mario1-3, kirby, and zelda
|
||||
0.02: Fix issue witih plumbers font where some numbers were cut off.
|
||||
0.03: Fix issue with smb3 font on 24hr time. Better center time.
|
|
@ -0,0 +1,8 @@
|
|||
# NES Themed Clock
|
||||
|
||||
NES Clock is a clock face that can display multiple themes based on a few NES(Nintendo Entertainment System) game title screens.
|
||||
|
||||
This clock has the same base clock features as Anton Clock, but can be configured in settings to change the clock theme.
|
||||
|
||||
## Compatibility
|
||||
This clock was built for Bangle.js 2. It was inteded to be run with widgets.
|
|
@ -0,0 +1 @@
|
|||
require("heatshrink").decompress(atob("mEwwhC/AH4A/AH4A4/4A/AA8zACn/+cRAAsSkQAEkIOGn4XfABwXDiUzmQvUichkYXVAIRHSkczC4MzE4IvFC5UxA4cxI6IXFF7DnFkJSBmRYBCQJfIifzmYLBAQMxifd6cj7oXEDAKpCAQPxAQIOBj4XDloXGU4gvJmYvHd4pfGBgRYBHwIXDAAqPQAAq/P/5UBAAv/AAgMGCwIAXgAA/AH4A/AH4A2"))
|
File diff suppressed because one or more lines are too long
Binary file not shown.
After Width: | Height: | Size: 1.2 KiB |
Binary file not shown.
After Width: | Height: | Size: 5.4 KiB |
Binary file not shown.
After Width: | Height: | Size: 4.3 KiB |
Binary file not shown.
After Width: | Height: | Size: 5.4 KiB |
Binary file not shown.
After Width: | Height: | Size: 5.0 KiB |
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
"id": "nesclock",
|
||||
"name": "NES Clock",
|
||||
"shortName": "NES Clock",
|
||||
"version": "0.03",
|
||||
"description": "A clock themed after different NES title screens.",
|
||||
"readme":"README.md",
|
||||
"icon": "app.png",
|
||||
"screenshots": [{"url":"mario3-screenshot.png"},{"url":"mario1-screenshot.png"},{"url":"mario2-screenshot.png"},{"url":"kirby-screenshot.png"},{"url":"zelda-screenshot.png"}],
|
||||
"type": "clock",
|
||||
"tags": "clock",
|
||||
"supports": ["BANGLEJS2"],
|
||||
"allow_emulator": false,
|
||||
"storage": [
|
||||
{"name":"nesclock.app.js","url":"app.js"},
|
||||
{"name":"nesclock.settings.js","url":"settings.js"},
|
||||
{"name":"nesclock.img","url":"app-icon.js","evaluate":true}
|
||||
],
|
||||
"data": [{"name":"nesclock.json"}]
|
||||
}
|
|
@ -0,0 +1,42 @@
|
|||
(function(back) {
|
||||
var FILE = "nesclock.json";
|
||||
var settings = Object.assign({
|
||||
currentFace: "Mario 3",
|
||||
}, require('Storage').readJSON(FILE, true) || {});
|
||||
|
||||
function writeSettings() {
|
||||
require('Storage').writeJSON(FILE, settings);
|
||||
}
|
||||
|
||||
// Helper method which uses int-based menu item for set of string values
|
||||
function stringItems(startvalue, writer, values) {
|
||||
return {
|
||||
value: (startvalue === undefined ? 0 : values.indexOf(startvalue)),
|
||||
format: v => values[v],
|
||||
min: 0,
|
||||
max: values.length - 1,
|
||||
wrap: true,
|
||||
step: 1,
|
||||
onchange: v => {
|
||||
writer(values[v]);
|
||||
writeSettings();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
// Helper method which breaks string set settings down to local settings object
|
||||
function stringInSettings(name, values) {
|
||||
return stringItems(settings[name], v => settings[name] = v, values);
|
||||
}
|
||||
|
||||
var mainmenu = {
|
||||
"": {
|
||||
"title": "NES Clock"
|
||||
},
|
||||
"< Back": () => back(),
|
||||
"Game Theme": stringInSettings("currentFace", ["Mario 3", "Mario 2", "Mario 1", "Kirby", "Zelda"]),
|
||||
};
|
||||
|
||||
E.showMenu(mainmenu);
|
||||
|
||||
});
|
Binary file not shown.
After Width: | Height: | Size: 5.9 KiB |
|
@ -1,3 +1,4 @@
|
|||
0.01: Initial version
|
||||
0.02: Checks for correct firmware; E.setDST(...) moved to boot.js
|
||||
0.03: Convert Yes/No On/Off in settings to checkboxes
|
||||
0.04: Give the boot file the highest priority to ensure it runs before sched (fix #2663)
|
|
@ -1,7 +1,7 @@
|
|||
{ "id": "widdst",
|
||||
"name": "Daylight Saving",
|
||||
"version":"0.03",
|
||||
"description": "Widget to set daylight saving rules. Requires Espruino 2v14.49 or later - see the instructions below for more information.",
|
||||
"version":"0.04",
|
||||
"description": "Widget to set daylight saving rules. Requires Espruino 2v15 or later - see the instructions below for more information.",
|
||||
"icon": "icon.png",
|
||||
"type": "widget",
|
||||
"tags": "widget,tool",
|
||||
|
@ -9,7 +9,7 @@
|
|||
"readme": "README.md",
|
||||
"storage": [
|
||||
{"name":"widdst.wid.js","url":"widget.js"},
|
||||
{"name":"widdst.boot.js","url":"boot.js"},
|
||||
{"name":"widdst.0.boot.js","url":"boot.js"},
|
||||
{"name":"widdst.settings.js","url":"settings.js"}
|
||||
],
|
||||
"data": [{"name":"widdst.json"}]
|
||||
|
|
Loading…
Reference in New Issue