Skip to content

Commit 7c8b21f

Browse files
committed
added daylight saving option
updated readme increased version
1 parent b5096ec commit 7c8b21f

File tree

3 files changed

+52
-24
lines changed

3 files changed

+52
-24
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ This is a highly customizable animated Matrix wallpaper for Wallpaper Engine (We
100100
- Clock
101101
- Horizontal/Vertical
102102
- 12/24 Hour Format
103+
- Day-light Saving
103104
- Scale
104105
- Position
105106
- Message

index.js

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
window.onload = function () {
2-
const version = "v4.2.0";
2+
const version = "v4.3.0";
33

44
checkForUpdates = async () => {
55
const url = 'https://api.github.com/repos/IPdotSetAF/NeoMatrix/tags';
@@ -51,6 +51,7 @@ window.onload = function () {
5151
ui_logo_positionY: 0,
5252
ui_clock_clock: "0",
5353
ui_clock_24HourFormat: true,
54+
ui_clock_dayLightSaving: 0,
5455
ui_clock_scale: 1,
5556
ui_clock_positionX: 0,
5657
ui_clock_positionY: 0,
@@ -134,6 +135,10 @@ window.onload = function () {
134135
updateTime();
135136
updateMask();
136137
});
138+
clockfolder.add(options, "ui_clock_dayLightSaving").min(-1).max(1).step(1).name("Day-light Saving").onChange(() => {
139+
updateTime();
140+
updateMask();
141+
});
137142
clockfolder.add(options, "ui_clock_scale").min(1).max(10).step(1).name("Scale").onChange(updateMask);
138143
const clockPositionFolder = clockfolder.addFolder("Position");
139144
clockPositionFolder.add(options, "ui_clock_positionX").min(-100).max(100).step(1).name("X").onChange(updateMask);
@@ -230,13 +235,17 @@ window.onload = function () {
230235
options.ui_clock_24HourFormat = properties.ui_clock_24hourformat.value;
231236
updateTime();
232237
}
238+
if (properties.ui_clock_daylightsaving) {
239+
options.ui_clock_dayLightSaving = properties.ui_clock_daylightsaving.value;
240+
updateTime();
241+
}
233242
if (properties.ui_clock_scale)
234243
options.ui_clock_scale = properties.ui_clock_scale.value;
235244
if (properties.ui_clock_positionx)
236245
options.ui_clock_positionX = properties.ui_clock_positionx.value;
237246
if (properties.ui_clock_positiony)
238247
options.ui_clock_positionY = properties.ui_clock_positiony.value;
239-
if (properties.ui_clock_clock || properties.ui_clock_24hourformat || properties.ui_clock_scale || properties.ui_clock_positionx || properties.ui_clock_positiony)
248+
if (properties.ui_clock_clock || properties.ui_clock_24hourformat || properties.ui_clock_daylightsaving || properties.ui_clock_scale || properties.ui_clock_positionx || properties.ui_clock_positiony)
240249
updateMask();
241250

242251
if (properties.ui_message_message)
@@ -337,6 +346,12 @@ window.onload = function () {
337346
hour = today.getHours();
338347
minute = today.getMinutes();
339348

349+
hour += options.ui_clock_dayLightSaving;
350+
if (hour < 0)
351+
hour = 23;
352+
if (hour > 23)
353+
hour = 0;
354+
340355
if (!options.ui_clock_24HourFormat && hour > 12) {
341356
hour = hour % 12;
342357
if (hour == 0)

project.json

Lines changed: 34 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -49,15 +49,15 @@
4949
},
5050
"folder_message" :
5151
{
52-
"index" : 34,
53-
"order" : 134,
52+
"index" : 35,
53+
"order" : 135,
5454
"text" : "<h4>Message</h4>",
5555
"type" : "text"
5656
},
5757
"folder_other" :
5858
{
59-
"index" : 40,
60-
"order" : 140,
59+
"index" : 41,
60+
"order" : 141,
6161
"text" : "<h4>Other</h4>",
6262
"type" : "text"
6363
},
@@ -200,14 +200,26 @@
200200
"type" : "combo",
201201
"value" : "0"
202202
},
203+
"ui_clock_daylightsaving" :
204+
{
205+
"condition" : "ui_clock_clock.value != 0",
206+
"fraction" : false,
207+
"index" : 31,
208+
"max" : 1,
209+
"min" : -1,
210+
"order" : 131,
211+
"text" : "Day-light Saving",
212+
"type" : "slider",
213+
"value" : 0
214+
},
203215
"ui_clock_positionx" :
204216
{
205217
"condition" : "ui_clock_clock.value != 0",
206218
"fraction" : false,
207-
"index" : 32,
219+
"index" : 33,
208220
"max" : 100,
209221
"min" : -100,
210-
"order" : 132,
222+
"order" : 133,
211223
"text" : "Clock Position X",
212224
"type" : "slider",
213225
"value" : 0
@@ -216,10 +228,10 @@
216228
{
217229
"condition" : "ui_clock_clock.value != 0",
218230
"fraction" : false,
219-
"index" : 33,
231+
"index" : 34,
220232
"max" : 100,
221233
"min" : -100,
222-
"order" : 133,
234+
"order" : 134,
223235
"text" : "Clock Position Y",
224236
"type" : "slider",
225237
"value" : 0
@@ -228,10 +240,10 @@
228240
{
229241
"condition" : "ui_clock_clock.value == 3 || ui_clock_clock.value == 4",
230242
"fraction" : false,
231-
"index" : 31,
243+
"index" : 32,
232244
"max" : 10,
233245
"min" : 1,
234-
"order" : 131,
246+
"order" : 132,
235247
"text" : "Clock Scale",
236248
"type" : "slider",
237249
"value" : 1
@@ -510,7 +522,7 @@
510522
},
511523
"ui_message_message" :
512524
{
513-
"index" : 35,
525+
"index" : 36,
514526
"options" :
515527
[
516528
{
@@ -522,7 +534,7 @@
522534
"value" : "3"
523535
}
524536
],
525-
"order" : 135,
537+
"order" : 136,
526538
"text" : "Message",
527539
"type" : "combo",
528540
"value" : "0"
@@ -531,10 +543,10 @@
531543
{
532544
"condition" : "ui_message_message.value != 0",
533545
"fraction" : false,
534-
"index" : 38,
546+
"index" : 39,
535547
"max" : 200,
536548
"min" : 0,
537-
"order" : 138,
549+
"order" : 139,
538550
"text" : "Message Position X",
539551
"type" : "slider",
540552
"value" : 0
@@ -543,10 +555,10 @@
543555
{
544556
"condition" : "ui_message_message.value != 0",
545557
"fraction" : false,
546-
"index" : 39,
558+
"index" : 40,
547559
"max" : 200,
548560
"min" : 0,
549-
"order" : 139,
561+
"order" : 140,
550562
"text" : "Message Position Y",
551563
"type" : "slider",
552564
"value" : 0
@@ -555,27 +567,27 @@
555567
{
556568
"condition" : "ui_message_message.value == 3 || ui_message_message.value == 4",
557569
"fraction" : false,
558-
"index" : 37,
570+
"index" : 38,
559571
"max" : 10,
560572
"min" : 1,
561-
"order" : 137,
573+
"order" : 138,
562574
"text" : "Message Scale",
563575
"type" : "slider",
564576
"value" : 1
565577
},
566578
"ui_message_text" :
567579
{
568580
"condition" : "ui_message_message.value != 0",
569-
"index" : 36,
570-
"order" : 136,
581+
"index" : 37,
582+
"order" : 137,
571583
"text" : "Message Text",
572584
"type" : "textinput",
573585
"value" : "THE MATRIX"
574586
},
575587
"ui_other_codescommaseparated" :
576588
{
577-
"index" : 41,
578-
"order" : 141,
589+
"index" : 42,
590+
"order" : 142,
579591
"text" : "Codes (comma separated)",
580592
"type" : "textinput",
581593
"value" : "THE MATRIX"

0 commit comments

Comments
 (0)