fancier error popups

This commit is contained in:
jill 2021-09-03 06:42:04 +03:00
parent b687772d31
commit f3d220f28c

View file

@ -151,10 +151,11 @@ function render(artist, album, title, songStart, songEnd, pauseSpot, paused) {
if (errorType === 1) color = '\033[43;37m'; if (errorType === 1) color = '\033[43;37m';
if (errorType === 2) color = '\033[44;37m'; if (errorType === 2) color = '\033[44;37m';
let text = ` ${symbol} ${errorText} `;
texts.push({ texts.push({
value: ` ${symbol} ${errorText} `, value: ' '.repeat(text.length) + text,
x: 4, x: -text.length * 2 + Math.round((text.length + 3) * outCirc(Math.min(errorTimer, 1))),
y: Math.round(3 * outCirc(Math.min(errorTimer, 1))), y: 3,
color: color color: color
}); });
} }