mirror of
https://github.com/netbymatt/ws4kp.git
synced 2026-04-18 17:49:31 -07:00
change to structured weather icon paths
This commit is contained in:
@@ -13,10 +13,10 @@ class Almanac extends WeatherDisplay {
|
||||
this.backgroundImage0 = loadImg('images/backgrounds/1.png');
|
||||
|
||||
// preload the moon images
|
||||
preloadImg('images/2/Full-Moon.gif');
|
||||
preloadImg('images/2/Last-Quarter.gif');
|
||||
preloadImg('images/2/New-Moon.gif');
|
||||
preloadImg('images/2/First-Quarter.gif');
|
||||
preloadImg(imageName('Full'));
|
||||
preloadImg(imageName('Last'));
|
||||
preloadImg(imageName('New'));
|
||||
preloadImg(imageName('First'));
|
||||
|
||||
this.timing.totalScreens = 1;
|
||||
}
|
||||
@@ -160,14 +160,14 @@ class Almanac extends WeatherDisplay {
|
||||
const imageName = (type) => {
|
||||
switch (type) {
|
||||
case 'Full':
|
||||
return 'images/2/Full-Moon.gif';
|
||||
return 'images/icons/moon-phases/Full-Moon.gif';
|
||||
case 'Last':
|
||||
return 'images/2/Last-Quarter.gif';
|
||||
return 'images/icons/moon-phases/Last-Quarter.gif';
|
||||
case 'New':
|
||||
return 'images/2/New-Moon.gif';
|
||||
return 'images/icons/moon-phases/New-Moon.gif';
|
||||
case 'First':
|
||||
default:
|
||||
return 'images/2/First-Quarter.gif';
|
||||
return 'images/icons/moon-phases/First-Quarter.gif';
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user