Added custom new clock: NES Clock

pull/2660/head
Kevin Whitaker 2023-03-25 17:31:16 -04:00
parent 4cdce7e907
commit 8b484f32ab
12 changed files with 312 additions and 0 deletions

1
apps/nesclock/ChangeLog Normal file
View File

@ -0,0 +1 @@
0.01: First release of clock with faces for mario1-3, kirby, and zelda

8
apps/nesclock/README.md Normal file
View File

@ -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.

View File

@ -0,0 +1 @@
require("heatshrink").decompress(atob("mEwwhC/AH4A/AH4A4/4A/AA8zACn/+cRAAsSkQAEkIOGn4XfABwXDiUzmQvUichkYXVAIRHSkczC4MzE4IvFC5UxA4cxI6IXFF7DnFkJSBmRYBCQJfIifzmYLBAQMxifd6cj7oXEDAKpCAQPxAQIOBj4XDloXGU4gvJmYvHd4pfGBgRYBHwIXDAAqPQAAq/P/5UBAAv/AAgMGCwIAXgAA/AH4A/AH4A2"))

245
apps/nesclock/app.js Normal file

File diff suppressed because one or more lines are too long

BIN
apps/nesclock/app.png Normal file

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

View File

@ -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"}]
}

37
apps/nesclock/settings.js Normal file
View File

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