Ensure calendar clockinfo is transparent and remove an unused font!

pull/3376/head
Gordon Williams 2024-04-19 15:30:18 +01:00
parent 96cc679b24
commit 7d59266438
3 changed files with 4 additions and 4 deletions

View File

@ -1,2 +1,3 @@
0.01: New App! 0.01: New App!
0.02: added settings options to change date format 0.02: added settings options to change date format
0.03: Remove un-needed font requirement, now outputs transparent image

View File

@ -1,9 +1,7 @@
(function() { (function() {
require("Font4x8Numeric").add(Graphics);
var settings = require("Storage").readJSON("clkinfocal.json",1)||{}; var settings = require("Storage").readJSON("clkinfocal.json",1)||{};
settings.fmt = settings.fmt||"DDD"; settings.fmt = settings.fmt||"DDD";
var getDateString = function(dt) { var getDateString = function(dt) {
switch(settings.fmt) { switch(settings.fmt) {
case "dd MMM": case "dd MMM":
@ -22,6 +20,7 @@
get : () => { get : () => {
let d = new Date(); let d = new Date();
let g = Graphics.createArrayBuffer(24,24,1,{msb:true}); let g = Graphics.createArrayBuffer(24,24,1,{msb:true});
g.transparent = 1;
g.drawImage(atob("FhgBDADAMAMP/////////////////////8AADwAAPAAA8AADwAAPAAA8AADwAAPAAA8AADwAAPAAA8AADwAAP///////"),1,0); g.drawImage(atob("FhgBDADAMAMP/////////////////////8AADwAAPAAA8AADwAAPAAA8AADwAAPAAA8AADwAAPAAA8AADwAAP///////"),1,0);
g.setFont("6x15").setFontAlign(0,0).drawString(d.getDate(),11,17); g.setFont("6x15").setFontAlign(0,0).drawString(d.getDate(),11,17);
return { return {

View File

@ -1,6 +1,6 @@
{ "id": "clkinfocal", { "id": "clkinfocal",
"name": "Calendar Clockinfo", "name": "Calendar Clockinfo",
"version":"0.02", "version":"0.03",
"description": "For clocks that display 'clockinfo' (messages that can be cycled through using the clock_info module) this displays the day of the month in the icon, and the weekday. There is also a settings menu to select the format of the text", "description": "For clocks that display 'clockinfo' (messages that can be cycled through using the clock_info module) this displays the day of the month in the icon, and the weekday. There is also a settings menu to select the format of the text",
"icon": "app.png", "icon": "app.png",
"screenshots": [{"url":"screenshot.png"}], "screenshots": [{"url":"screenshot.png"}],