2021-01-06 20:56:06 +00:00
|
|
|
// ************ Themes ************
|
|
|
|
const themes = {
|
|
|
|
1: "aqua"
|
|
|
|
};
|
|
|
|
const theme_names = {
|
|
|
|
aqua: "Aqua"
|
|
|
|
};
|
|
|
|
function changeTheme() {
|
2021-06-03 05:04:56 +00:00
|
|
|
let aqua = options.theme == "aqua";
|
|
|
|
colors_theme = colors[options.theme || "default"];
|
2021-01-06 20:56:06 +00:00
|
|
|
document.body.style.setProperty('--background', aqua ? "#001f3f" : "#0f0f0f");
|
|
|
|
document.body.style.setProperty('--background_tooltip', aqua ? "rgba(0, 15, 31, 0.75)" : "rgba(0, 0, 0, 0.75)");
|
|
|
|
document.body.style.setProperty('--color', aqua ? "#bfdfff" : "#dfdfdf");
|
|
|
|
document.body.style.setProperty('--points', aqua ? "#dfefff" : "#ffffff");
|
|
|
|
document.body.style.setProperty("--locked", aqua ? "#c4a7b3" : "#bf8f8f");
|
|
|
|
}
|
|
|
|
function getThemeName() {
|
2021-06-03 05:04:56 +00:00
|
|
|
return options.theme ? theme_names[options.theme] : "Default";
|
2021-01-06 20:56:06 +00:00
|
|
|
}
|
|
|
|
function switchTheme() {
|
2021-06-03 05:04:56 +00:00
|
|
|
if (options.theme === null)
|
|
|
|
options.theme = themes[1];
|
2021-01-06 20:56:06 +00:00
|
|
|
else {
|
2021-06-03 05:04:56 +00:00
|
|
|
options.theme = themes[Object.keys(themes)[options.theme] + 1];
|
|
|
|
if (!options.theme)
|
|
|
|
options.theme = null;
|
2021-01-06 20:56:06 +00:00
|
|
|
}
|
|
|
|
changeTheme();
|
|
|
|
resizeCanvas();
|
|
|
|
}
|