diff --git a/project/plugins.js b/project/plugins.js index 76491c3..ed47f69 100644 --- a/project/plugins.js +++ b/project/plugins.js @@ -11911,16 +11911,16 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = } if (core.domStyle.isVertical) { //竖屏 - const pageupbox = makeBox([30, 380], [144, 144]); - const pagedownbox = makeBox([30, 1080], [144, 144]); + const pageupbox = makeBox([200, 1830], [200, 100]); + const pagedownbox = makeBox([900, 1830], [200, 100]); - const imagebox0 = makeBox([200, 300], [480, 320]); - const imagebox1 = makeBox([200, 750], [480, 320]); - const imagebox2 = makeBox([200, 1200], [480, 320]); + const imagebox0 = makeBox([50, 200], [560, 420]); + const imagebox1 = makeBox([50, 750], [560, 420]); + const imagebox2 = makeBox([50, 1300], [560, 420]); - const imagebox3 = makeBox([700, 300], [480, 320]); - const imagebox4 = makeBox([700, 750], [480, 320]); - const imagebox5 = makeBox([700, 1200], [480, 320]); + const imagebox3 = makeBox([650, 200], [560, 420]); + const imagebox4 = makeBox([650, 750], [560, 420]); + const imagebox5 = makeBox([650, 1300], [560, 420]); if (inRect(pos, pagedownbox)) { //2代表当前最大页数-1 if (page < this.UIMx.length - 1) { @@ -11996,14 +11996,14 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = } } } else { - const pageupbox = makeBox([30, 340], [144, 144]); - const pagedownbox = makeBox([30, 840], [144, 144]); - const imagebox0 = makeBox([300, 300], [480, 320]); - const imagebox1 = makeBox([800, 300], [480, 320]); - const imagebox2 = makeBox([1300, 300], [480, 320]); - const imagebox3 = makeBox([300, 750], [480, 320]); - const imagebox4 = makeBox([800, 750], [480, 320]); - const imagebox5 = makeBox([1300, 750], [480, 320]); + const pageupbox = makeBox([200, 1110], [200, 100]); + const pagedownbox = makeBox([1600, 1110], [200, 100]); + const imagebox0 = makeBox([75, 150], [600, 450]); + const imagebox1 = makeBox([725, 150], [600, 450]); + const imagebox2 = makeBox([1300, 150], [600, 450]); + const imagebox3 = makeBox([75, 650], [600, 450]); + const imagebox4 = makeBox([725, 650], [600, 450]); + const imagebox5 = makeBox([1375, 650], [600, 450]); if (inRect(pos, pagedownbox)) { if (page < this.UIMx.length - 1) { page++; @@ -12080,11 +12080,12 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = 6, core.ui._buildFont(66, true) ); + core.fillBoldText1( ctx, '上一页', - 100, - 450, + 300, + 1900, page === 0 ? "#444444" : "#FFFFFF", "#000000", 6, @@ -12094,8 +12095,8 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = core.fillBoldText1( ctx, (page + 1) + "/" + this.UIMx.length, - 100, - 800, + 650, + 1900, "#FFFFFF", "#000000", 6, @@ -12104,8 +12105,8 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = core.fillBoldText1( ctx, '下一页', - 100, - 1150, + 1000, + 1900, page === this.UIMx.length - 1 ? "#444444" : "#FFFFFF", "#000000", 6, @@ -12121,20 +12122,20 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = const img = core.material.images.images[this.UIMx[page][j][i]]; core.strokeRect( ctx, - 200 + j * 500, - 300 + i * 450, - 480, - 320, + 50 + j * 600, + 200 + i * 550, + 560, + 420, "#444444", 5 ); if (img) ctx.drawImage( img, - 200 + j * 500 + 15, - 300 + i * 450 + 15, - 480 - 30, - 320 - 30 + 50 + j * 600 + 15, + 200 + i * 550 + 15, + 560 - 30, + 420 - 30 ); } } @@ -12161,8 +12162,8 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = core.fillBoldText1( ctx, '上一页', - 100, - 400, + 300, + 1180, page === 0 ? "#444444" : "#FFFFFF", "#000000", 6, @@ -12172,8 +12173,8 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = core.fillBoldText1( ctx, (page + 1) + "/" + this.UIMx.length, - 100, - 650, + 1000, + 1180, "#FFFFFF", "#000000", 6, @@ -12182,8 +12183,8 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = core.fillBoldText1( ctx, '下一页', - 100, - 900, + 1700, + 1180, page === this.UIMx.length - 1 ? "#444444" : "#FFFFFF", "#000000", 6, @@ -12195,10 +12196,10 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = for (let j = 0; j < 3; j++) { core.strokeRect( ctx, - 300 + j * 500, - 300 + i * 450, - 480, - 320, + 75 + j * 650, + 150 + i * 500, + 600, + 450, "#444444", 2 ); @@ -12206,10 +12207,10 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = if (img) ctx.drawImage( img, - 300 + j * 500 + 15, - 300 + i * 450 + 15, - 480 - 30, - 320 - 30 + 75 + j * 650 + 15, + 150 + i * 500 + 15, + 600 - 30, + 450 - 30 ); } } @@ -13741,71 +13742,71 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = }; }, "属性映射": function () { - // 在此增加新插件 - this.statusEquip = function () { - const hero = core.status.hero; - //装备具体效果在这里写,道具填写道具类型为equip并选择装备类型,道具的装备属性中装备类型遵循以下填写方式: - //固定装备孔的填写0/1/2/3,分别对应主手、副手、防具、饰品 - //主副手同时可使用的,填写 武器 - //具体的换装时装备切换操作写在新道具栏/物品栏插件 - //当前仅完善法杖、单手剑、双手剑、匕首、盾牌的多孔切换操作 - //主武器效果 - if (core.getEquip[0]) { - switch (core.getEquip[0]) { - case "sword1": - hero.atk = hero.str + hero.agi; - hero.magic = false; - break; - } - } - //副手效果 - if (core.getEquip[1]) { - switch (core.getEquip[1]) { - case "sword1": - hero.atk += hero.agi; - break; - } - } - //防具效果 - if (core.getEquip[2]) { - switch (core.getEquip[2]) { - case "sword1": - hero.def = hero.con + hero.agi; - hero.hpmax = 2.5 * hero.con; - break; - } - } - //饰品效果 - if (core.getEquip[3]) { - switch (core.getEquip[3]) { - case "sword1": - hero.speed += 0.4 * hero.int + 0.6 * hero.agi; - break; - } - } - }; - this.updateStatus = function () { - const hero = core.status.hero; - //默认映射关系 - hero.hpmax = hero.str * 50 + hero.con * 50; - hero.atk = hero.str * 0.5 + hero.int * 0.5; - hero.manamax = hero.agi * 0.5 + hero.int * 0.5; - hero.def = hero.con * 0.5 + hero.agi * 0.5; - hero.mdef = hero.con * 0.5 + hero.int * 0.5; - hero.speed = hero.str * 0.5 + hero.agi * 0.5; - hero.magic = false; - this.statusEquip(); //处理装备效果 - for (let v in hero) { - //归整 - if (typeof hero[v] === "number") { - hero[v] = Math.floor(hero[v]); - } - } - hero.hp = Math.min(hero.hp, hero.hpmax); - hero.mana = Math.min(hero.mana, hero.manamax); - core.status.hero = hero; - }; - }, + // 在此增加新插件 + this.statusEquip = function () { + const hero = core.status.hero; + //装备具体效果在这里写,道具填写道具类型为equip并选择装备类型,道具的装备属性中装备类型遵循以下填写方式: + //固定装备孔的填写0/1/2/3,分别对应主手、副手、防具、饰品 + //主副手同时可使用的,填写 武器 + //具体的换装时装备切换操作写在新道具栏/物品栏插件 + //当前仅完善法杖、单手剑、双手剑、匕首、盾牌的多孔切换操作 + //主武器效果 + if (core.getEquip[0]) { + switch (core.getEquip[0]) { + case "sword1": + hero.atk = hero.str + hero.agi; + hero.magic = false; + break; + } + } + //副手效果 + if (core.getEquip[1]) { + switch (core.getEquip[1]) { + case "sword1": + hero.atk += hero.agi; + break; + } + } + //防具效果 + if (core.getEquip[2]) { + switch (core.getEquip[2]) { + case "sword1": + hero.def = hero.con + hero.agi; + hero.hpmax = 2.5 * hero.con; + break; + } + } + //饰品效果 + if (core.getEquip[3]) { + switch (core.getEquip[3]) { + case "sword1": + hero.speed += 0.4 * hero.int + 0.6 * hero.agi; + break; + } + } + }; + this.updateStatus = function () { + const hero = core.status.hero; + //默认映射关系 + hero.hpmax = hero.str * 50 + hero.con * 50; + hero.atk = hero.str * 0.5 + hero.int * 0.5; + hero.manamax = hero.agi * 0.5 + hero.int * 0.5; + hero.def = hero.con * 0.5 + hero.agi * 0.5; + hero.mdef = hero.con * 0.5 + hero.int * 0.5; + hero.speed = hero.str * 0.5 + hero.agi * 0.5; + hero.magic = false; + this.statusEquip(); //处理装备效果 + for (let v in hero) { + //归整 + if (typeof hero[v] === "number") { + hero[v] = Math.floor(hero[v]); + } + } + hero.hp = Math.min(hero.hp, hero.hpmax); + hero.mana = Math.min(hero.mana, hero.manamax); + core.status.hero = hero; + }; +}, "回合制boss战": function () { // 在此增加新插件 const boss = document.createElement("canvas"); //boss战画布设置 @@ -14186,8 +14187,16 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = let page = 0; //初始页面 let ischange = false; let isvolume = false; - let pcx = 0; - let pcy = 0; + + function shuffle(arr) { + let n = arr.length, + random; + while (n) { + random = (Math.random() * n--) >>> 0; + [arr[n], arr[random]] = [arr[random], arr[n]]; + } + return arr; + } music.addEventListener('mousedown', function (e) { e.stopPropagation(); const left = core.dom.gameGroup.offsetLeft; @@ -14284,6 +14293,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = } else { main.core.ui.music.selection[1] += 1 } + main.core.ui.music.randomList.indexOf(v => v === main.core.ui.music.musicMx[main.core.ui.music.selection[0]][main.core.ui.music.selection[1]]) page = main.core.ui.music.selection[0] audio.src = "project/bgms/" + main.core.ui.music.musicMx[main.core.ui.music.selection[0]][main.core.ui.music.selection[1]] @@ -14291,8 +14301,13 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = main.core.ui.music.stop = false break; case 'suiji': - main.core.ui.music.selection[0] = getRandomInt(0, main.core.ui.music.musicMx.length) - main.core.ui.music.selection[1] = getRandomInt(0, main.core.ui.music.musicMx[main.core.ui.music.selection[0]].length) + if (main.core.ui.music.random < main.core.ui.music.randomList.length - 1) { + main.core.ui.music.random += 1 + } else { + main.core.ui.music.random = 0 + } + main.core.ui.music.selection[0] = main.core.ui.music.musicMx.findIndex(v => v.includes(main.core.ui.music.randomList[main.core.ui.music.random])) + main.core.ui.music.selection[1] = main.core.ui.music.musicMx[main.core.ui.music.selection[0]].indexOf(main.core.ui.music.randomList[main.core.ui.music.random]) audio.src = "project/bgms/" + main.core.ui.music.musicMx[main.core.ui.music.selection[0]][main.core.ui.music.selection[1]] page = main.core.ui.music.selection[0] @@ -14301,7 +14316,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = break; } }) - core.audio = audio + class musicclass { constructor() { @@ -14322,6 +14337,8 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = this.selection = [0, 0] this.stop = false this.type = "xunhuan" + this.randomList = [] + this.random = 0 } //更新 @@ -14368,15 +14385,15 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = } if (core.domStyle.isVertical) { //竖屏 - const pageupbox = makeBox([100, 900], [200, 100]); - const pagedownbox = makeBox([700, 900], [200, 100]); - const musicbox = makeBox([100, 200], [800, this.musicMx[page].length * 100]) - const beforebox = makeBox([310, 1720], [100, 100]) - const afterbox = makeBox([700, 1720], [100, 100]) - const playbox = makeBox([480, 1680], [160, 160]) - const typebox = makeBox([830, 1710], [150, 150]) - const changebox = makeBox([-100 + pcx, pcy + 590], [1000, 20]) - const volumebox = makeBox([890 + 250, 200], [20, 500]) + const pageupbox = makeBox([100, 1230], [200, 100]); + const pagedownbox = makeBox([950, 1230], [200, 100]); + const musicbox = makeBox([100, 200], [1048, this.musicMx[page].length * 100]) + const beforebox = makeBox([120, 1720], [100, 100]) + const afterbox = makeBox([780, 1720], [100, 100]) + const playbox = makeBox([420, 1680], [200, 200]) + const typebox = makeBox([1040, 1700], [120, 120]) + const changebox = makeBox([100, 1590], [1048, 20]) + const volumebox = makeBox([250, 1940], [1050, 20]) if (inRect(pos, pageupbox)) { if (page !== 0) page -= 1 return; @@ -14416,6 +14433,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = } else { this.selection[1] -= 1 } + this.randomList.indexOf(this.musicMx[this.selection[0]][this.selection[1]]) page = this.selection[0] audio.src = "project/bgms/" + this.musicMx[this.selection[0]][this.selection[1]] @@ -14423,8 +14441,13 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = this.stop = false break; case 'suiji': - this.selection[0] = getRandomInt(0, this.musicMx.length) - this.selection[1] = getRandomInt(0, this.musicMx[this.selection[0]].length) + if (this.random > 0) { + this.random -= 1 + } else { + this.random = this.randomList.length - 1 + } + this.selection[0] = this.musicMx.findIndex(v => v.includes(this.randomList[this.random])) + this.selection[1] = this.musicMx[this.selection[0]].indexOf(this.randomList[this.random]) audio.src = "project/bgms/" + this.musicMx[this.selection[0]][this.selection[1]] page = this.selection[0] @@ -14454,6 +14477,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = } else { this.selection[1] += 1 } + this.random = this.randomList.indexOf(this.musicMx[this.selection[0]][this.selection[1]]) page = this.selection[0] audio.src = "project/bgms/" + this.musicMx[this.selection[0]][this.selection[1]] @@ -14461,8 +14485,13 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = this.stop = false break; case 'suiji': - this.selection[0] = getRandomInt(0, this.musicMx.length) - this.selection[1] = getRandomInt(0, this.musicMx[this.selection[0]].length) + if (this.random < this.randomList.length - 1) { + this.random += 1 + } else { + this.random = 0 + } + this.selection[0] = this.musicMx.findIndex(v => v.includes(this.randomList[this.random])) + this.selection[1] = this.musicMx[this.selection[0]].indexOf(this.randomList[this.random]) audio.src = "project/bgms/" + this.musicMx[this.selection[0]][this.selection[1]] page = this.selection[0] @@ -14487,11 +14516,12 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = return; } if (inRect(pos, musicbox)) { - pcy = -800 - const index = Math.floor((py - 1000 - pcy) / 100) + + const index = Math.floor((py - 200) / 100) if (page !== this.selection[0] || index !== this.selection[1]) { this.selection[0] = page this.selection[1] = index + this.randomList.indexOf(this.musicMx[this.selection[0]][this.selection[1]]) audio.src = "project/bgms/" + this.musicMx[page][index] if (!this.stop) audio.play() @@ -14518,7 +14548,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = ischange = true } if (inRect(pos, volumebox)) { - const time = (700 - py) / 500 + const time = Math.min(Math.max((px - 250) / 800, 0), 1) audio.volume = time isvolume = true } @@ -14572,6 +14602,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = } else { this.selection[1] -= 1 } + this.indexOf(this.musicMx[this.selection[0]][this.selection[1]]) page = this.selection[0] audio.src = "project/bgms/" + this.musicMx[this.selection[0]][this.selection[1]] @@ -14579,8 +14610,13 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = this.stop = false break; case 'suiji': - this.selection[0] = getRandomInt(0, this.musicMx.length) - this.selection[1] = getRandomInt(0, this.musicMx[this.selection[0]].length) + if (this.random > 0) { + this.random -= 1 + } else { + this.random = this.randomList.length - 1 + } + this.selection[0] = this.musicMx.findIndex(v => v.includes(this.randomList[this.random])) + this.selection[1] = this.musicMx[this.selection[0]].indexOf(this.randomList[this.random]) audio.src = "project/bgms/" + this.musicMx[this.selection[0]][this.selection[1]] page = this.selection[0] @@ -14610,6 +14646,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = } else { this.selection[1] += 1 } + this.randomList.findIndex(v => v === this.musicMx[this.selection[0]][this.selection[1]]) page = this.selection[0] audio.src = "project/bgms/" + this.musicMx[this.selection[0]][this.selection[1]] @@ -14617,8 +14654,13 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = this.stop = false break; case 'suiji': - this.selection[0] = getRandomInt(0, this.musicMx.length) - this.selection[1] = getRandomInt(0, this.musicMx[this.selection[0]].length) + if (this.random < this.randomList.length - 1) { + this.random += 1 + } else { + this.random = 0 + } + this.selection[0] = this.musicMx.findIndex(v => v.includes(this.randomList[this.random])) + this.selection[1] = this.musicMx[this.selection[0]].indexOf(main.core.ui.music.randomList[main.core.ui.music.random]) audio.src = "project/bgms/" + this.musicMx[this.selection[0]][this.selection[1]] page = this.selection[0] @@ -14643,10 +14685,12 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = return; } if (inRect(pos, musicbox)) { + const index = Math.floor((py - 100) / 100) if (page !== this.selection[0] || index !== this.selection[1]) { this.selection[0] = page this.selection[1] = index + this.randomList.indexOf(v => v === this.musicMx[this.selection[0]][this.selection[1]]) audio.src = "project/bgms/" + this.musicMx[page][index] if (!this.stop) audio.play() @@ -14673,7 +14717,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = ischange = true } if (inRect(pos, volumebox)) { - const time = (px - 100) / 600 + const time = Math.min(Math.max((px - 100) / 600, 0), 1) audio.volume = time isvolume = true } @@ -14683,7 +14727,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = if (ischange) { if (core.domStyle.isVertical) { - const time = Math.min(Math.max(Math.floor((px - 100) / 1000 * audio.duration), 0), audio.duration) + const time = Math.min(Math.max(Math.floor((px - 100) / 600 * audio.duration), 0), audio.duration) audio.currentTime = time } else { @@ -14695,7 +14739,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = } if (isvolume) { if (core.domStyle.isVertical) { - const time = Math.min(Math.max((700 - py) / 500, 0), 1) + const time = Math.min(Math.max((px - 250) / 800, 0), 1) audio.volume = time } else { const time = Math.min(Math.max((px - 100) / 600, 0), 1) @@ -14714,7 +14758,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = //竖屏 core.fillRect(ctx, 0, 0, 1248, 2028, "#000000"); //黑色背景 - ctx.globalAlpha = 0.5; //透明度 + ctx.globalAlpha = 0.3; //透明度 if (bgVertical) ctx.drawImage(bgVertical, 0, 0, 1280, 1500, 0, 0, 1248, 2028); //绘制半透明背景图片 ctx.globalAlpha = 1; //恢复为不透明 @@ -14730,18 +14774,16 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = 6, core.ui._buildFont(66, true) ); - //core.fillRect(ctx, 440, 760, 50, 50) - pcx = 0 - pcy = -800 + + ctx.strokeStyle = "#FFFFFF" ctx.lineWidth = 3 ctx.beginPath() - ctx.moveTo(50 + pcx, pcy + 1000) - ctx.lineTo(50 + pcx, pcy + 1900) - ctx.moveTo(1000 + pcx, pcy + 1000) - ctx.lineTo(1000 + pcx, pcy + 1900) + ctx.moveTo(100, 200) + ctx.lineTo(1148, 200) + ctx.stroke() - let posy = 1100 + let posy = 300 const indexList = this.musicMx[page] core.setTextAlign(ctx, "left"); for (let i = 0; i < indexList.length; i++) { @@ -14749,7 +14791,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = core.fillBoldText1( ctx, text, - 100 + pcx, pcy + + 150, posy - 30, page === this.selection[0] && i === this.selection[1] ? "#FFFFFF" : "#444444", "#000000", @@ -14759,18 +14801,23 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = ctx.strokeStyle = "#FFFFFF" ctx.lineWidth = 3 ctx.beginPath() - ctx.moveTo(100 + pcx, pcy + posy) - ctx.lineTo(900 + pcx, pcy + posy) + ctx.moveTo(100, posy) + ctx.lineTo(1148, posy) ctx.stroke() posy += 100 } - + ctx.beginPath() + ctx.moveTo(100, 1210) + ctx.lineTo(1148, 1210) + ctx.moveTo(100, 1200) + ctx.lineTo(1148, 1200) + ctx.stroke() core.fillBoldText1( ctx, '上一页', 100, - 1000, + 1300, page === 0 ? "#444444" : "#FFFFFF", "#000000", 6, @@ -14780,8 +14827,8 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = core.fillBoldText1( ctx, (page + 1) + "/" + this.musicMx.length, - 450, - 1000, + 580, + 1300, "#FFFFFF", "#000000", 6, @@ -14790,106 +14837,105 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = core.fillBoldText1( ctx, '下一页', - 700, - 1000, + 950, + 1300, page === this.musicMx.length - 1 ? "#444444" : "#FFFFFF", "#000000", 6, core.ui._buildFont(66, true) ); - pcx = 200 - pcy = 1000 + ctx.strokeStyle = "#ffffff" ctx.lineWidth = 3 ctx.beginPath() - ctx.moveTo(-100 + pcx, pcy + 600) - ctx.lineTo(900 + pcx, pcy + 600) + ctx.moveTo(100, 1600) + ctx.lineTo(1148, 1600) ctx.stroke() ctx.fillStyle = "#ffffff" ctx.font = "bold 96px Verdana" - ctx.fillText('|', 100 + pcx, pcy + 797) - ctx.fillText('◀', 115 + pcx, pcy + 800) + ctx.fillText('|', 100, 1797) + ctx.fillText('◀', 115, 1800) ctx.beginPath() - ctx.arc(355 + pcx, pcy + 770, 80, 0, 3 * Math.PI) + ctx.arc(505, 1770, 80, 0, 3 * Math.PI) ctx.stroke() - ctx.fillText('|', 555 + pcx, pcy + 797) - ctx.fillText('▶', 505 + pcx, pcy + 800) - if (this.stop) { ctx.fillText('▶', 323 + pcx, pcy + 797) } else { ctx.fillText('||', 303 + pcx, pcy + 794) } + ctx.fillText('|', 835, 1797) + ctx.fillText('▶', 785, 1800) + if (this.stop) { ctx.fillText('▶', 473, 1797) } else { ctx.fillText('||', 453, 1794) } const img = core.material.images.images[this.type + '.webp'] - if (img) ctx.drawImage(img, 600 + pcx, pcy + 655, 200, 200) + if (img) ctx.drawImage(img, 1000, 1655, 200, 200) core.setTextAlign(ctx, "center"); ctx.font = "bold 52px Verdana" - ctx.fillText('当前歌曲', 400 + pcx, pcy + 297) - ctx.fillText(this.musicname[this.musicMx[this.selection[0]][this.selection[1]]], 400 + pcx, pcy + 457) + ctx.fillText('当前歌曲', 625, 1397) + ctx.fillText(this.musicname[this.musicMx[this.selection[0]][this.selection[1]]], 625, 1507) ctx.font = "bold 36px Verdana" const thistime = audio.currentTime if (thistime) { const timetext = (Math.floor(thistime / 60).toString()).padStart(2, '0') + ':' + Math.floor(thistime % 60).toString().padStart(2, '0') - ctx.fillText(timetext, 810 + pcx, pcy + 650) + ctx.fillText(timetext, 960, 1650) } else { const timetext = "00:00" - ctx.fillText(timetext, 810 + pcx, pcy + 650) + ctx.fillText(timetext, 960, 1650) } - ctx.fillText("/", 880 + pcx, pcy + 650) + ctx.fillText("/", 1030, 1650) const fulltime = audio.duration if (fulltime) { const timetext = Math.floor(fulltime / 60).toString().padStart(2, '0') + ':' + Math.floor(fulltime % 60).toString().padStart(2, '0') - ctx.fillText(timetext, 950 + pcx, pcy + 650) + ctx.fillText(timetext, 1100, 1650) } else { const timetext = "00:00" - ctx.fillText(timetext, 950 + pcx, pcy + 650) + ctx.fillText(timetext, 1100, 1650) } ctx.strokeStyle = "#ffffff" ctx.lineWidth = 9 ctx.fillStyle = 'rgba(255,255,255,0.5)' - const pointx = 1000 * thistime / fulltime - 100 + const pointx = 1048 * thistime / fulltime + 100 if (fulltime && thistime) { ctx.beginPath() - ctx.moveTo(-100 + pcx, pcy + 600) - ctx.lineTo(pointx + pcx, pcy + 600) + ctx.moveTo(100, 1600) + ctx.lineTo(pointx, 1600) ctx.stroke() ctx.beginPath() - ctx.arc(pointx + pcx, pcy + 600, 10, 0, 2 * Math.PI) + ctx.arc(pointx, 1600, 10, 0, 2 * Math.PI) ctx.fill() } else { ctx.beginPath() - ctx.arc(-100 + pcx, pcy + 600, 10, 0, 2 * Math.PI) + ctx.arc(100, 1600, 10, 0, 2 * Math.PI) ctx.fill() } - pcx = 250 - pcy = 0 - ctx.fillText('音', 850 + pcx, pcy + 425) - ctx.fillText('量', 850 + pcx, pcy + 510) + ctx.fillStyle = "#ffffff" + ctx.font = "bold 48px Verdana" + ctx.fillText('音量', 150, 1970) + ctx.lineWidth = 3 ctx.beginPath() - ctx.moveTo(900 + pcx, pcy + 200) - ctx.lineTo(900 + pcx, pcy + 700) + ctx.moveTo(250, 1950) + ctx.lineTo(1050, 1950) ctx.stroke() ctx.strokeStyle = "#ffffff" ctx.lineWidth = 9 ctx.fillStyle = 'rgba(255,255,255,0.5)' ctx.beginPath() - ctx.moveTo(900 + pcx, pcy + 700) - ctx.lineTo(900 + pcx, pcy - 500 * audio.volume + 700) + ctx.moveTo(250, 1950) + ctx.lineTo(800 * audio.volume + 250, 1950) ctx.stroke() ctx.beginPath() - ctx.arc(900 + pcx, pcy - 500 * audio.volume + 700, 10, 0, 2 * Math.PI) + ctx.arc(800 * audio.volume + 250, 1950, 10, 0, 2 * Math.PI) ctx.fill() core.fillBoldText1( ctx, Math.floor(100 * audio.volume), - 915 + pcx, - pcy + 200, + 1120, + 1970, "#FFFFFF", "#000000", 6, - core.ui._buildFont(32, true) + core.ui._buildFont(48, true) ); } else { @@ -15070,7 +15116,9 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = main.core.control.checkBgm(); main.core.control.pauseBgm(); audio.src = "project/bgms/" + main.core.ui.music.musicMx[main.core.ui.music.selection[0]][main.core.ui.music.selection[1]] - + const arr = main.core.ui.music.musicMx.flat(Infinity) + main.core.ui.music.randomList = shuffle(arr) + main.core.ui.music.random = main.core.ui.music.randomList.indexOf(main.core.ui.music.musicMx[main.core.ui.music.selection[0]][main.core.ui.music.selection[1]]) page = 0; music.style.display = "block"; core.registerAnimationFrame("music", null, () => { main.core.ui.music.update() })