隐藏歌单

This commit is contained in:
草莓 2025-01-23 22:25:18 +08:00
parent c1263db1af
commit 38979d5040
2 changed files with 238 additions and 209 deletions

View File

@ -2647,7 +2647,7 @@ return code;
*/; */;
setmusics_s setmusics_s
: '音乐鉴赏music 文件名'EvalString?'不填为清空cg获取记录' Newline : '音乐鉴赏music 文件名'EvalString?'不填为清空music获取记录' Newline
/* setmusics_s /* setmusics_s
tooltip : setmusics音乐鉴赏中的隐藏music获取 tooltip : setmusics音乐鉴赏中的隐藏music获取

View File

@ -16444,6 +16444,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
class musicclass { class musicclass {
constructor() { constructor() {
this.musics = ["theme.opus"]
//music列表 //music列表
//需全塔属性注册并保存在bgms文件夹,每个数组为显示的一页内容 //需全塔属性注册并保存在bgms文件夹,每个数组为显示的一页内容
this.musicMx = [ this.musicMx = [
@ -16558,6 +16559,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
break; break;
case "xunhuan": case "xunhuan":
for (;;) {
if (this.selection[1] === 0) { if (this.selection[1] === 0) {
if (this.selection[0] === 0) { if (this.selection[0] === 0) {
this.selection[0] = this.musicMx.length - 1; this.selection[0] = this.musicMx.length - 1;
@ -16571,11 +16573,12 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
} else { } else {
this.selection[1] -= 1; this.selection[1] -= 1;
} }
this.randomList.indexOf( this.random = this.randomList.indexOf(
this.musicMx[this.selection[0]][this.selection[1]] this.musicMx[this.selection[0]][this.selection[1]]
); );
page = this.selection[0]; page = this.selection[0];
if (this.musics.includes(this.musicMx[this.selection[0]][this.selection[1]]) || page !== this.musicMx.length - 1) break
}
core.playBgm( core.playBgm(
main.core.ui.music.musicMx[main.core.ui.music.selection[0]][ main.core.ui.music.musicMx[main.core.ui.music.selection[0]][
main.core.ui.music.selection[1] main.core.ui.music.selection[1]
@ -16584,6 +16587,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
break; break;
case "suiji": case "suiji":
for (;;) {
if (this.random > 0) { if (this.random > 0) {
this.random -= 1; this.random -= 1;
} else { } else {
@ -16597,7 +16601,8 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
); );
page = this.selection[0]; page = this.selection[0];
if (this.musics.includes(this.musicMx[this.selection[0]][this.selection[1]]) || page !== this.musicMx.length - 1) break
}
core.playBgm( core.playBgm(
main.core.ui.music.musicMx[main.core.ui.music.selection[0]][ main.core.ui.music.musicMx[main.core.ui.music.selection[0]][
main.core.ui.music.selection[1] main.core.ui.music.selection[1]
@ -16621,6 +16626,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
page = this.selection[0]; page = this.selection[0];
break; break;
case "xunhuan": case "xunhuan":
for (;;) {
if ( if (
this.selection[1] === this.selection[1] ===
this.musicMx[this.selection[0]].length - 1 this.musicMx[this.selection[0]].length - 1
@ -16639,7 +16645,8 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
this.musicMx[this.selection[0]][this.selection[1]] this.musicMx[this.selection[0]][this.selection[1]]
); );
page = this.selection[0]; page = this.selection[0];
if (this.musics.includes(this.musicMx[this.selection[0]][this.selection[1]]) || page !== this.musicMx.length - 1) break
}
core.playBgm( core.playBgm(
main.core.ui.music.musicMx[main.core.ui.music.selection[0]][ main.core.ui.music.musicMx[main.core.ui.music.selection[0]][
main.core.ui.music.selection[1] main.core.ui.music.selection[1]
@ -16648,6 +16655,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
break; break;
case "suiji": case "suiji":
for (;;) {
if (this.random < this.randomList.length - 1) { if (this.random < this.randomList.length - 1) {
this.random += 1; this.random += 1;
} else { } else {
@ -16661,6 +16669,8 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
); );
page = this.selection[0]; page = this.selection[0];
if (this.musics.includes(this.musicMx[this.selection[0]][this.selection[1]]) || page !== this.musicMx.length - 1) break
}
core.playBgm( core.playBgm(
main.core.ui.music.musicMx[main.core.ui.music.selection[0]][ main.core.ui.music.musicMx[main.core.ui.music.selection[0]][
main.core.ui.music.selection[1] main.core.ui.music.selection[1]
@ -16688,7 +16698,9 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
if (inRect(pos, musicbox)) { if (inRect(pos, musicbox)) {
const index = Math.floor((py - 200) / 100); const index = Math.floor((py - 200) / 100);
if (page !== this.selection[0] || index !== this.selection[1]) { if (page !== this.selection[0] || index !== this.selection[1]) {
if (this.musics.includes(this.musicMx[page][index]) || page !== this.musicMx.length - 1) {
this.selection[0] = page; this.selection[0] = page;
this.selection[1] = index; this.selection[1] = index;
this.randomList.indexOf( this.randomList.indexOf(
this.musicMx[this.selection[0]][this.selection[1]] this.musicMx[this.selection[0]][this.selection[1]]
@ -16701,6 +16713,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
); );
this.stop = false; this.stop = false;
}
} else { } else {
if (this.stop) { if (this.stop) {
this.stop = !this.stop; this.stop = !this.stop;
@ -16755,7 +16768,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
this.stop = false; this.stop = false;
switch (this.type) { switch (this.type) {
case "danqu": case "danqu":
if (!this.stop)
core.playBgm( core.playBgm(
main.core.ui.music.musicMx[main.core.ui.music.selection[0]][ main.core.ui.music.musicMx[main.core.ui.music.selection[0]][
main.core.ui.music.selection[1] main.core.ui.music.selection[1]
@ -16766,6 +16779,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
break; break;
case "xunhuan": case "xunhuan":
for (;;) {
if (this.selection[1] === 0) { if (this.selection[1] === 0) {
if (this.selection[0] === 0) { if (this.selection[0] === 0) {
this.selection[0] = this.musicMx.length - 1; this.selection[0] = this.musicMx.length - 1;
@ -16784,7 +16798,8 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
); );
page = this.selection[0]; page = this.selection[0];
if (!this.stop) if (this.musics.includes(this.musicMx[this.selection[0]][this.selection[1]]) || page !== this.musicMx.length - 1) break
}
core.playBgm( core.playBgm(
main.core.ui.music.musicMx[main.core.ui.music.selection[0]][ main.core.ui.music.musicMx[main.core.ui.music.selection[0]][
main.core.ui.music.selection[1] main.core.ui.music.selection[1]
@ -16793,6 +16808,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
break; break;
case "suiji": case "suiji":
for (;;) {
if (this.random > 0) { if (this.random > 0) {
this.random -= 1; this.random -= 1;
} else { } else {
@ -16807,7 +16823,8 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
page = this.selection[0]; page = this.selection[0];
if (!this.stop) if (this.musics.includes(this.musicMx[this.selection[0]][this.selection[1]]) || page !== this.musicMx.length - 1) break
}
core.playBgm( core.playBgm(
main.core.ui.music.musicMx[main.core.ui.music.selection[0]][ main.core.ui.music.musicMx[main.core.ui.music.selection[0]][
main.core.ui.music.selection[1] main.core.ui.music.selection[1]
@ -16822,7 +16839,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
this.stop = false; this.stop = false;
switch (this.type) { switch (this.type) {
case "danqu": case "danqu":
if (!this.stop)
core.playBgm( core.playBgm(
main.core.ui.music.musicMx[main.core.ui.music.selection[0]][ main.core.ui.music.musicMx[main.core.ui.music.selection[0]][
main.core.ui.music.selection[1] main.core.ui.music.selection[1]
@ -16832,6 +16849,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
page = this.selection[0]; page = this.selection[0];
break; break;
case "xunhuan": case "xunhuan":
for (;;) {
if ( if (
this.selection[1] === this.selection[1] ===
this.musicMx[this.selection[0]].length - 1 this.musicMx[this.selection[0]].length - 1
@ -16852,7 +16870,8 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
); );
page = this.selection[0]; page = this.selection[0];
if (!this.stop) if (this.musics.includes(this.musicMx[this.selection[0]][this.selection[1]]) || page !== this.musicMx.length - 1) break
}
core.playBgm( core.playBgm(
main.core.ui.music.musicMx[main.core.ui.music.selection[0]][ main.core.ui.music.musicMx[main.core.ui.music.selection[0]][
main.core.ui.music.selection[1] main.core.ui.music.selection[1]
@ -16861,6 +16880,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
break; break;
case "suiji": case "suiji":
for (;;) {
if (this.random < this.randomList.length - 1) { if (this.random < this.randomList.length - 1) {
this.random += 1; this.random += 1;
} else { } else {
@ -16874,7 +16894,8 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
); );
page = this.selection[0]; page = this.selection[0];
if (!this.stop) if (this.musics.includes(this.musicMx[this.selection[0]][this.selection[1]]) || page !== this.musicMx.length - 1) break
}
core.playBgm( core.playBgm(
main.core.ui.music.musicMx[main.core.ui.music.selection[0]][ main.core.ui.music.musicMx[main.core.ui.music.selection[0]][
main.core.ui.music.selection[1] main.core.ui.music.selection[1]
@ -16902,6 +16923,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
if (inRect(pos, musicbox)) { if (inRect(pos, musicbox)) {
const index = Math.floor((py - 100) / 100); const index = Math.floor((py - 100) / 100);
if (page !== this.selection[0] || index !== this.selection[1]) { if (page !== this.selection[0] || index !== this.selection[1]) {
if (this.musics.includes(this.musicMx[page][index]) || page !== this.musicMx.length - 1) {
this.selection[0] = page; this.selection[0] = page;
this.selection[1] = index; this.selection[1] = index;
this.randomList.indexOf( this.randomList.indexOf(
@ -16914,6 +16936,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
] ]
); );
this.stop = false; this.stop = false;
}
} else { } else {
if (this.stop) { if (this.stop) {
this.stop = !this.stop; this.stop = !this.stop;
@ -16986,6 +17009,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
core.setTextAlign(ctx, "left"); core.setTextAlign(ctx, "left");
for (let i = 0; i < indexList.length; i++) { for (let i = 0; i < indexList.length; i++) {
const text = this.musicname[indexList[i]]; const text = this.musicname[indexList[i]];
if (this.musics.includes(this.musicMx[page][i]) || page !== this.musicMx.length - 1) {
core.fillBoldText1( core.fillBoldText1(
ctx, ctx,
text, text,
@ -16998,12 +17022,14 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
6, 6,
core.ui._buildFont(66, true) core.ui._buildFont(66, true)
); );
ctx.strokeStyle = "#FFFFFF"; ctx.strokeStyle = "#FFFFFF";
ctx.lineWidth = 3; ctx.lineWidth = 3;
ctx.beginPath(); ctx.beginPath();
ctx.moveTo(100, posy); ctx.moveTo(100, posy);
ctx.lineTo(1148, posy); ctx.lineTo(1148, posy);
ctx.stroke(); ctx.stroke();
}
posy += 100; posy += 100;
} }
ctx.beginPath(); ctx.beginPath();
@ -17136,6 +17162,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
core.setTextAlign(ctx, "left"); core.setTextAlign(ctx, "left");
for (let i = 0; i < indexList.length; i++) { for (let i = 0; i < indexList.length; i++) {
const text = this.musicname[indexList[i]]; const text = this.musicname[indexList[i]];
if (this.musics.includes(this.musicMx[page][i]) || page !== this.musicMx.length - 1) {
core.fillBoldText1( core.fillBoldText1(
ctx, ctx,
text, text,
@ -17148,12 +17175,14 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
6, 6,
core.ui._buildFont(66, true) core.ui._buildFont(66, true)
); );
ctx.strokeStyle = "#FFFFFF"; ctx.strokeStyle = "#FFFFFF";
ctx.lineWidth = 3; ctx.lineWidth = 3;
ctx.beginPath(); ctx.beginPath();
ctx.moveTo(900, posy); ctx.moveTo(900, posy);
ctx.lineTo(1900, posy); ctx.lineTo(1900, posy);
ctx.stroke(); ctx.stroke();
}
posy += 100; posy += 100;
} }
core.fillBoldText1( core.fillBoldText1(
@ -17248,7 +17277,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
core.ui.music = new musicclass(); core.ui.music = new musicclass();
main.dom.musicMode.onclick = function () { main.dom.musicMode.onclick = function () {
//点击开始页面的CG MODE进入cg回廊 //点击开始页面的CG MODE进入cg回廊
main.core.ui.music.musics = core.getLocalStorage("musics", ["theme.opus"])
core.playBgm( core.playBgm(
main.core.ui.music.musicMx[main.core.ui.music.selection[0]][ main.core.ui.music.musicMx[main.core.ui.music.selection[0]][
main.core.ui.music.selection[1] main.core.ui.music.selection[1]