Skip to content

Commit 8c08e4d

Browse files
committed
added newline support to message
increased version
1 parent 3d68241 commit 8c08e4d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

index.js

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

44
checkForUpdates = async () => {
55
const url = 'https://api.github.com/repos/IPdotSetAF/NeoMatrix/tags';
@@ -370,7 +370,7 @@ window.onload = function () {
370370
}
371371
case "4": {
372372
let center = [Math.floor((columns - 7 * options.ui_clock_scale) / 2), Math.floor((rows + options.ui_clock_scale) / 2)];
373-
drawTextOnMask(hour + "\n" + minute, center[0] + options.ui_clock_positionX, center[1] + options.ui_clock_positionY - 1 * options.ui_clock_scale, options.ui_clock_scale);
373+
drawTextOnMask(hour + "\\n" + minute, center[0] + options.ui_clock_positionX, center[1] + options.ui_clock_positionY - 1 * options.ui_clock_scale, options.ui_clock_scale);
374374
break;
375375
}
376376
}
@@ -387,7 +387,7 @@ window.onload = function () {
387387
function drawTextOnMask(text, x, y, scale) {
388388
mask.font = options.ui_font_size * 5 * scale + "px neo-matrix";
389389
mask.fillStyle = "#FFF";
390-
lines = text.split("\n");
390+
lines = text.split("\\n");
391391
for (let i = 0; i < lines.length; i++) {
392392
mask.fillText(lines[i], options.ui_font_size * x - font_fraction, options.ui_font_size * y + font_fraction + (6 * i * options.ui_font_size * scale));
393393
}

0 commit comments

Comments
 (0)