- Version: 1.0
- Downloaded: 2367 times
- Viewed: 8073 times
- File Size: 88.73 KB
- File Type: .watch file
- Create Date: August 6, 2015
- Last Updated: August 6, 2015
Some smartwatches like the Moto360 have a brightness sensor some don't (like the LG Watch R). Those without have the problem that the display is too bright during the evening and the night. You can change the brightness by hand, but it is much more convenient if this is done automatically. This is the idea of the night mode, which lowers the brightness of the display during the night or to be precise between half an hour after sunset and half an hour after sunrise. Luckily Watchmaker has variables for the correct time of sunset and sunrise depending on location and season. Realizing the night mode is very easy.
First you set the following variables in the script:
var_enableNightMode = true
var_nightModeBrightness = 70
The first one allows to switch night mode on or off (for example depending on the watch (i.e. off for Moto360 and on for LG Watch R). The second one defines the brightness during night mode.
After these two variables are defined in the script you just need a circle with width and height 512 as the very last layer. Color is pure black and the opacity is as follows:
(var_enableNightMode == true and (({dtp} {wssp} + 0.021))) and 100-var_nightModeBrightness or 0
This will lower the brightness during the night.
The watchface shows an example. It has a tab action in the center which switches the night mode on or off. Remember that you will only see a difference after half an hour after sunset and that the night mode only makes sense for watches without a brightness sensor.
One last tip: Add the night mode only after your watchface is complete, because once the circle had been added as the last layer you can't select any element on the watchface in Watchmaker (because the circle covers all other elements and for that reason Watchmaker will always select the circle).
File | |
---|---|
tutorial-night-mode.watch |