cg音频重置

This commit is contained in:
草莓 2025-02-01 09:23:06 +08:00
parent 3f53086c9f
commit eb19824d50

View File

@ -113,8 +113,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
data.image,
data.memory,
data.hidetime || 30,
data.list || [
{
data.list || [{
text: "",
sound: "",
time: 50,
@ -122,8 +121,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
boldColor: "#000000",
font: "bold 48px Verdana",
frame: 0,
},
]
}, ]
);
} else {
core.doAction();
@ -203,13 +201,13 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
core.ui.cgText.head = core.clone(data.head);
core.ui.cgText.index = data.index;
core.ui.cgText.name = core.ui.cgText.textList[data.index][0];
core.ui.cgText.text = data.text
? data.text
: core.ui.cgText.textList[data.index][1];
core.ui.cgText.text = data.text ?
data.text :
core.ui.cgText.textList[data.index][1];
core.ui.cgText.time = data.time;
core.ui.cgText.wait = data.wait;
core.ui.cgText.WindowSkin = data.WindowSkin;
core.ui.cgText.sound = data.sound || "";
core.ui.cgText.sound = data.sound === "" ? data.sound : core.ui.cgText.textList[data.index][3] || "";
core.ui.cgText.bodyList = core.clone(data.bodyList);
main.dom.cgText.style.display = "block";
core.ui.cgText.update();
@ -15184,7 +15182,10 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
[x + w, y + h],
];
};
const inRect = ([x, y], [[sx, sy], [dx, dy]]) => {
const inRect = ([x, y], [
[sx, sy],
[dx, dy]
]) => {
return sx <= x && x <= dx && sy <= y && y <= dy;
};
const pos = [px, py];
@ -15365,9 +15366,9 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
config.defaultFont = config.font = config.font || globalAttribute.font;
config.time = config.time || 0;
config.letterSpacing =
config.letterSpacing == null
? textAttribute.letterSpacing || 0
: config.letterSpacing;
config.letterSpacing == null ?
textAttribute.letterSpacing || 0 :
config.letterSpacing;
config.index = 0;
config.currcolor = config.color;
@ -15421,9 +15422,9 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
var block = config.blocks[config.index++];
if (block != null) {
// It works, why?
const scale = config.isHD
? devicePixelRatio * core.domStyle.scale
: 1;
const scale = config.isHD ?
devicePixelRatio * core.domStyle.scale :
1;
ctx.restore();
ctx.save(); //保存设置
if (core.domStyle.isVertical) {
@ -15526,17 +15527,15 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
const indexList = this.textList;
core.setTextAlign(logctx, "left");
for (
let i = (page - 1) * 6;
i <= Math.min(this.index, page * 6 - 1);
i++
let i = (page - 1) * 6; i <= Math.min(this.index, page * 6 - 1); i++
) {
const text = this.textList[i][1].replaceAll(
/(\\(d|e|f|g|i|n|r|b|c|t|z))(\[.*?\])?/g,
""
); //取消打字机
const name = this.textList[i][0]
? "【" + this.textList[i][0] + "】"
: "";
const name = this.textList[i][0] ?
"【" + this.textList[i][0] + "】" :
"";
if (name) {
core.fillBoldText1(
logctx,