mirror of https://github.com/espruino/BangleApps
Added custom new clock: NES Clock
parent
4cdce7e907
commit
8b484f32ab
|
@ -0,0 +1 @@
|
||||||
|
0.01: First release of clock with faces for mario1-3, kirby, and zelda
|
|
@ -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 Clocl",
|
||||||
|
"version": "0.01",
|
||||||
|
"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": true,
|
||||||
|
"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,37 @@
|
||||||
|
(function(back) {
|
||||||
|
var FILE = "nesclock.json";
|
||||||
|
// Load settings
|
||||||
|
var settings = Object.assign({
|
||||||
|
currentFace: "Mario 3",
|
||||||
|
}, require('Storage').readJSON(FILE, true) || {});
|
||||||
|
|
||||||
|
function writeSettings() {
|
||||||
|
require('Storage').writeJSON(FILE, settings);
|
||||||
|
}
|
||||||
|
|
||||||
|
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();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
function stringInSettings(name, values) {
|
||||||
|
return stringItems(settings[name], v => settings[name] = v, values);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Show the menu
|
||||||
|
E.showMenu({
|
||||||
|
"" : { "title" : "NES Clock" },
|
||||||
|
"< Back" : () => back(),
|
||||||
|
'Game Theme': stringInSettings("currentFace", ["Mario 3", "Mario 2", "Mario 1", "Kirby", "Zelda"]),
|
||||||
|
});
|
||||||
|
})(load);
|
Binary file not shown.
After Width: | Height: | Size: 5.9 KiB |
Loading…
Reference in New Issue