In night mode, further left swipes reduce the screen brightness (3 levels) until returning to day-mode
parent
b7d94f3244
commit
20ad2efbd4
|
|
@ -914,7 +914,7 @@
|
||||||
{ "id": "marioclock",
|
{ "id": "marioclock",
|
||||||
"name": "Mario Clock",
|
"name": "Mario Clock",
|
||||||
"icon": "marioclock.png",
|
"icon": "marioclock.png",
|
||||||
"version":"0.09",
|
"version":"0.10",
|
||||||
"description": "Animated retro Mario clock, with Gameboy style 8-bit grey-scale graphics.",
|
"description": "Animated retro Mario clock, with Gameboy style 8-bit grey-scale graphics.",
|
||||||
"tags": "clock,mario,retro",
|
"tags": "clock,mario,retro",
|
||||||
"type": "clock",
|
"type": "clock",
|
||||||
|
|
|
||||||
|
|
@ -6,4 +6,5 @@
|
||||||
0.06: Performance refactor, and enhanced graphics!
|
0.06: Performance refactor, and enhanced graphics!
|
||||||
0.07: Swipe right to change between Mario and Toad characters, swipe left to toggle night mode
|
0.07: Swipe right to change between Mario and Toad characters, swipe left to toggle night mode
|
||||||
0.08: Update date panel to be info panel toggling between Date, Battery and Temperature. Add Princes Daisy
|
0.08: Update date panel to be info panel toggling between Date, Battery and Temperature. Add Princes Daisy
|
||||||
0.09: Add GadgetBridge functionality. Mario shows message type in speach bubble, while message scrolls in info panel
|
0.09: Add GadgetBridge functionality. Mario shows message type in speach bubble, while message scrolls in info panel
|
||||||
|
0.10: Swiping left to enable night-mode now also reduces LCD brightness through 3 levels before returning to day-mode.
|
||||||
|
|
@ -8,7 +8,7 @@ Enjoy watching Mario, or one of the other game characters run through a level wh
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
* Multiple characters - swipe the screen right to change the character between `Mario`, `Toad`, and `Daisy`
|
* Multiple characters - swipe the screen right to change the character between `Mario`, `Toad`, and `Daisy`
|
||||||
* Night and Day modes - swipe left to toggle mode
|
* Night and Day modes - swipe left to enter night mode, with 3 levels of darkness before returning to day mode.
|
||||||
* Smooth animation
|
* Smooth animation
|
||||||
* Awesome 8-bit style grey-scale graphics
|
* Awesome 8-bit style grey-scale graphics
|
||||||
* Mario jumps to change the time, every minute
|
* Mario jumps to change the time, every minute
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,8 @@ const is12Hour = settings["12hour"] || false;
|
||||||
|
|
||||||
// Screen dimensions
|
// Screen dimensions
|
||||||
let W, H;
|
let W, H;
|
||||||
|
// Screen brightness
|
||||||
|
let brightness = 1;
|
||||||
|
|
||||||
let intervalRef, displayTimeoutRef = null;
|
let intervalRef, displayTimeoutRef = null;
|
||||||
|
|
||||||
|
|
@ -164,7 +166,17 @@ function switchCharacter() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function toggleNightMode() {
|
function toggleNightMode() {
|
||||||
nightMode = !nightMode;
|
if (!nightMode) {
|
||||||
|
nightMode = true;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
brightness -= 0.30;
|
||||||
|
if (brightness <= 0) {
|
||||||
|
brightness = 1;
|
||||||
|
nightMode = false;
|
||||||
|
}
|
||||||
|
Bangle.setLCDBrightness(brightness);
|
||||||
}
|
}
|
||||||
|
|
||||||
function incrementTimer() {
|
function incrementTimer() {
|
||||||
|
|
@ -625,4 +637,4 @@ function init() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Initialise!
|
// Initialise!
|
||||||
init()
|
init();
|
||||||
Loading…
Reference in New Issue