Skip to content

Commit dc16334

Browse files
committed
fixed properties loading
updated sucrose Info
1 parent bedb511 commit dc16334

File tree

3 files changed

+60
-63
lines changed

3 files changed

+60
-63
lines changed

SucroseInfo.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"AppVersion": "24.5.17.0",
3-
"Version": "1.0.0.0",
3+
"Version": "7.1.0",
44
"Title": "Neo Matrix",
55
"Thumbnail": "thumbnail.jpg",
66
"Preview": "preview.gif",

SucroseProperties.json

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -464,17 +464,6 @@
464464
"help": "Enter codes (comma separated)",
465465
"type": "textbox",
466466
"value": "IP.AF,THE MATRIX"
467-
},
468-
"ui_other_preset": {
469-
"text": "Preset",
470-
"help": "Enter preset",
471-
"type": "textbox",
472-
"value": ""
473-
},
474-
"ui_other_debug": {
475-
"text": "Debug Mode",
476-
"type": "checkbox",
477-
"value": false
478467
}
479468
}
480469
}

index.js

Lines changed: 59 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -401,12 +401,15 @@ window.onload = function () {
401401
options.trailLength = calculateTrailLength(val.value / 100);
402402
updateMask();
403403
break;
404-
case "ui_rain_dropcount":
405-
options.ui_rain_dropCount = val.value;
406-
break;
407404
case "ui_rain_initialanimation":
408405
options.ui_rain_initialAnimation = val.value.toString();
406+
initialAnimation();
409407
break;
408+
case "ui_rain_dropcount":
409+
options.ui_rain_dropCount = val.value;
410+
initialAnimation();
411+
break;
412+
410413
case "ui_color_colormode":
411414
options.ui_color_colorMode = val.value.toString();
412415
break;
@@ -420,21 +423,29 @@ window.onload = function () {
420423
case "ui_color_highlightfirstcharacter":
421424
options.ui_color_highlightFirstCharacter = val.value;
422425
break;
426+
423427
case "ui_characters_charset":
424428
options.ui_characters_charset = val.value.toString();
429+
updateCharSet();
425430
break;
426431
case "ui_characters_customcharset":
427432
options.ui_characters_customCharset = val.value;
433+
updateCharSet();
428434
break;
429-
case "ui_font_size":
430-
options.ui_font_size = val.value;
431-
break;
435+
432436
case "ui_font_font":
433437
options.ui_font_font = val.value.toString();
438+
updateFont();
434439
break;
435440
case "ui_font_customfont":
436441
options.ui_font_customFont = val.value;
442+
updateFont();
443+
break;
444+
case "ui_font_size":
445+
options.ui_font_size = val.value;
446+
updateFont();
437447
break;
448+
438449
case "ui_audio_audioresponsive":
439450
options.ui_audio_audioResponsive = val.value;
440451
break;
@@ -447,155 +458,152 @@ window.onload = function () {
447458
case "ui_audio_silencetimeoutseconds":
448459
options.ui_audio_silenceTimeoutSeconds = val.value;
449460
break;
461+
450462
case "ui_logo_logo":
451463
options.ui_logo_logo = val.value.toString();
464+
updateLogo();
452465
break;
453466
case "ui_logo_customlogo":
454467
options.ui_logo_customLogo = val.value;
468+
updateLogo();
455469
break;
456470
case "ui_logo_preservecolor":
457471
options.ui_logo_preserveColor = val.value;
472+
updateLogo();
458473
break;
459474
case "ui_logo_scale":
460475
options.ui_logo_scale = val.value;
476+
updateLogo();
461477
break;
462478
case "ui_logo_positionx":
463479
options.ui_logo_positionX = val.value;
480+
updateLogo();
464481
break;
465482
case "ui_logo_positiony":
466483
options.ui_logo_positionY = val.value;
484+
updateLogo();
467485
break;
486+
468487
case "ui_clock_clock":
469488
options.ui_clock_clock = val.value.toString();
489+
updateMask();
470490
break;
471491
case "ui_clock_24hourformat":
472492
options.ui_clock_24HourFormat = val.value;
473493
updateTime();
494+
updateMask();
474495
break;
475496
case "ui_clock_daylightsaving":
476497
options.ui_clock_dayLightSaving = val.value;
477498
updateTime();
499+
updateMask();
478500
break;
479501
case "ui_clock_scale":
480502
options.ui_clock_scale = val.value;
503+
updateMask();
481504
break;
482505
case "ui_clock_positionx":
483506
options.ui_clock_positionX = val.value;
507+
updateMask();
484508
break;
485509
case "ui_clock_positiony":
486510
options.ui_clock_positionY = val.value;
511+
updateMask();
487512
break;
513+
488514
case "ui_day_day":
489515
options.ui_day_day = val.value.toString();
516+
updateMask();
490517
break;
491518
case "ui_day_allcaps":
492519
options.ui_day_allCaps = val.value;
520+
updateMask();
493521
break;
494522
case "ui_day_orientation":
495523
options.ui_day_orientation = val.value;
524+
updateMask();
496525
break;
497526
case "ui_day_scale":
498527
options.ui_day_scale = val.value;
528+
updateMask();
499529
break;
500530
case "ui_day_positionx":
501531
options.ui_day_positionX = val.value;
532+
updateMask();
502533
break;
503534
case "ui_day_positiony":
504535
options.ui_day_positionY = val.value;
536+
updateMask();
505537
break;
538+
506539
case "ui_date_date":
507540
options.ui_date_date = val.value.toString();
508541
updateTime();
542+
updateMask();
543+
break;
544+
case "ui_date_orientation":
545+
options.ui_date_orientation = val.value;
546+
updateMask();
509547
break;
510548
case "ui_date_year":
511549
options.ui_date_year = val.value.toString();
550+
updateMask();
512551
break;
513552
case "ui_date_order":
514553
options.ui_date_order = val.value.toString();
554+
updateMask();
515555
break;
516556
case "ui_date_monthname":
517557
options.ui_date_monthName = val.value;
558+
updateMask();
518559
break;
519560
case "ui_date_allcaps":
520561
options.ui_date_allCaps = val.value;
562+
updateMask();
521563
break;
522564
case "ui_date_delimiter":
523565
options.ui_date_delimiter = val.value.toString();
524-
break;
525-
case "ui_date_orientation":
526-
options.ui_date_orientation = val.value;
566+
updateMask();
527567
break;
528568
case "ui_date_scale":
529569
options.ui_date_scale = val.value;
570+
updateMask();
530571
break;
531572
case "ui_date_positionx":
532573
options.ui_date_positionX = val.value;
574+
updateMask();
533575
break;
534576
case "ui_date_positiony":
535577
options.ui_date_positionY = val.value;
578+
updateMask();
536579
break;
580+
537581
case "ui_message_message":
538582
options.ui_message_message = val.value;
583+
updateMask();
539584
break;
540585
case "ui_message_text":
541586
options.ui_message_text = val.value;
587+
updateMask();
542588
break;
543589
case "ui_message_scale":
544590
options.ui_message_scale = val.value;
591+
updateMask();
545592
break;
546593
case "ui_message_positionx":
547594
options.ui_message_positionX = val.value;
595+
updateMask();
548596
break;
549597
case "ui_message_positiony":
550598
options.ui_message_positionY = val.value;
599+
updateMask();
551600
break;
601+
552602
case "ui_other_codescommaseparated":
553603
options.codes = makeCodes(val.value);
554604
initialAnimation();
555605
break;
556-
case "ui_other_preset":
557-
if (val.value) {
558-
window.localStorage.setItem("preset", atob(val.value));
559-
options.Load();
560-
} else {
561-
window.localStorage.removeItem("preset");
562-
options.Reset();
563-
}
564-
break;
565-
case "ui_other_debug":
566-
document.getElementById('gui').innerHTML = '';
567-
drawGui();
568-
if (val.value) {
569-
document.getElementById('gui').style.display = 'block';
570-
} else {
571-
document.getElementById('gui').style.display = 'none';
572-
}
573-
break;
574606
}
575-
576-
if (options.ui_rain_initialAnimation || options.ui_rain_dropcount)
577-
initialAnimation();
578-
579-
if (options.ui_characters_charset || options.ui_characters_customcharset)
580-
updateCharSet();
581-
582-
if (options.ui_font_font || options.ui_font_customFont || options.ui_font_size)
583-
updateFont();
584-
585-
if (options.ui_logo_logo || options.ui_logo_customlogo || options.ui_logo_scale || options.ui_logo_positionx || options.ui_logo_positiony || options.ui_logo_preservecolor)
586-
updateLogo();
587-
588-
if (options.ui_clock_clock || options.ui_clock_24hourformat || options.ui_clock_daylightsaving || options.ui_clock_scale || options.ui_clock_positionx || options.ui_clock_positiony)
589-
updateMask();
590-
591-
if (options.ui_day_day || options.ui_day_allcaps || options.ui_day_orientation || options.ui_day_scale || options.ui_day_positionx || options.ui_day_positiony)
592-
updateMask();
593-
594-
if (options.ui_date_date || options.ui_date_orientation || options.ui_date_year || options.ui_date_order || options.ui_date_monthname || options.ui_date_allcaps || options.ui_date_delimiter || options.ui_date_scale || options.ui_date_positionx || options.ui_date_positiony)
595-
updateMask();
596-
597-
if (options.ui_message_message || options.ui_message_text || options.ui_message_scale || options.ui_message_positionx || options.ui_message_positiony)
598-
updateMask();
599607
};
600608

601609
window.addEventListener('resize', function () {

0 commit comments

Comments
 (0)