소스 검색

Add a background-brightness option

master
Fen Dweller 4 년 전
부모
커밋
f7e49e9d60
1개의 변경된 파일34개의 추가작업 그리고 1개의 파일을 삭제
  1. +34
    -1
      macrovision.js

+ 34
- 1
macrovision.js 파일 보기

@@ -723,7 +723,21 @@ function drawScales(ifDirty = false) {

ctx.beginPath();
ctx.rect(0, 0, ctx.canvas.width / deviceScale, ctx.canvas.height / deviceScale);
ctx.fillStyle = "#333";

switch(config.background){
case "black":
ctx.fillStyle = "#000";
break;
case "dark":
ctx.fillStyle = "#111";
break;
case "medium":
ctx.fillStyle = "#333";
break;
case "light":
ctx.fillStyle = "#555";
break;
}
ctx.fill();


@@ -2500,6 +2514,25 @@ const settingsData = {
toggleBodyClass("toggle-entity-glow", param);
}
},
"background-brightness": {
name: "Background Brightness",
desc: "How bright the background is",
type: "select",
default: "medium",
options: [
"black",
"dark",
"medium",
"light",
],
get value() {
return config.background;
},
set value(param) {
config.background = param;
drawScales();
}
},
"smoothing": {
name: "Smoothing",
desc: "Smooth out movements and size changes. Disable for better performance.",


불러오는 중...
취소
저장