imgclock: Add configurable color - and 'this is fine.'
parent
67135a3224
commit
8ad50eccf1
|
|
@ -168,7 +168,7 @@
|
||||||
"name": "Image background clock",
|
"name": "Image background clock",
|
||||||
"shortName":"Image Clock",
|
"shortName":"Image Clock",
|
||||||
"icon": "app.png",
|
"icon": "app.png",
|
||||||
"version":"0.01",
|
"version":"0.02",
|
||||||
"description": "A clock with an image as a background",
|
"description": "A clock with an image as a background",
|
||||||
"tags": "clock",
|
"tags": "clock",
|
||||||
"type" : "clock",
|
"type" : "clock",
|
||||||
|
|
|
||||||
|
|
@ -1 +1,2 @@
|
||||||
0.01: New App!
|
0.01: New App!
|
||||||
|
0.02: Add configurable color - and 'this is fine.'
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,7 @@ function draw() {
|
||||||
// quickly set background image
|
// quickly set background image
|
||||||
new Uint8Array(cg.buffer).set(bgimg);
|
new Uint8Array(cg.buffer).set(bgimg);
|
||||||
// draw time
|
// draw time
|
||||||
|
cg.setColor(inf.col);
|
||||||
cg.setFontAlign(-1,-1);
|
cg.setFontAlign(-1,-1);
|
||||||
var x = 0;
|
var x = 0;
|
||||||
cg.setFont("7x11Numeric7Seg",3);
|
cg.setFont("7x11Numeric7Seg",3);
|
||||||
|
|
|
||||||
|
|
@ -13,8 +13,9 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
var faces = [
|
var faces = [
|
||||||
{ img:"122240.png", bpp : 8, x:120, y:20, name:"Cityscape", attrib:"getwallpapers.com", attribLink:"http://getwallpapers.com/collection/8-bit-wallpaper", description:"" },
|
{ img:"122240.png", bpp : 8, x:120, y:20, col:"#FFFFFF", name:"Cityscape", attrib:"getwallpapers.com", attribLink:"http://getwallpapers.com/collection/8-bit-wallpaper", description:"" },
|
||||||
{ img:"122271.png", bpp : 8, x:10, y:125, name:"Sunset", attrib:"getwallpapers.com", attribLink:"http://getwallpapers.com/collection/8-bit-wallpaper", description:"" },
|
{ img:"122271.png", bpp : 8, x:10, y:125, col:"#FFFFFF", name:"Sunset", attrib:"getwallpapers.com", attribLink:"http://getwallpapers.com/collection/8-bit-wallpaper", description:"" },
|
||||||
|
{ img:"thisisfine.png", bpp : 8, x:85, y:5, col:"#000000", name:"This is fine.", attrib:"Gunshow #648", attribLink:"https://knowyourmeme.com/memes/this-is-fine", description:"" },
|
||||||
];
|
];
|
||||||
|
|
||||||
document.querySelector(".columns").innerHTML = faces.map((face,facenumber)=>`
|
document.querySelector(".columns").innerHTML = faces.map((face,facenumber)=>`
|
||||||
|
|
@ -44,7 +45,8 @@
|
||||||
var faceInfo = {
|
var faceInfo = {
|
||||||
bpp : face.bpp,
|
bpp : face.bpp,
|
||||||
x : face.x,
|
x : face.x,
|
||||||
y : face.y
|
y : face.y,
|
||||||
|
col : face.col
|
||||||
};
|
};
|
||||||
var img = document.querySelector(`img[face='${facenumber}']`);
|
var img = document.querySelector(`img[face='${facenumber}']`);
|
||||||
var imgString = imageconverter.imagetoString(img, {mode:"web",output:"raw",compression:false});
|
var imgString = imageconverter.imagetoString(img, {mode:"web",output:"raw",compression:false});
|
||||||
|
|
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 18 KiB |
Loading…
Reference in New Issue