Merge branch 'CG' of https://gitea.mota.press/Dove/Eustia into CG
This commit is contained in:
commit
11cb4f0ed8
File diff suppressed because one or more lines are too long
@ -63,5 +63,11 @@ main.floors.MT2=
|
||||
"fgmap": [
|
||||
|
||||
],
|
||||
"areas": "牢狱"
|
||||
"areas": "牢狱",
|
||||
"bg2map": [
|
||||
|
||||
],
|
||||
"fg2map": [
|
||||
|
||||
]
|
||||
}
|
Binary file not shown.
Before Width: | Height: | Size: 2.5 MiB After Width: | Height: | Size: 3.5 MiB |
@ -8832,7 +8832,14 @@ core.plugin.animate = {
|
||||
//竖屏
|
||||
const pageupbox = makeBox([33, 384], [144, 136])
|
||||
const pagedownbox = makeBox([33, 1080], [144, 190])
|
||||
const imagebox0 = makeBox([200, 300], [480, 320])
|
||||
|
||||
const imagebox0 = makeBox([200, 300], [680, 320])
|
||||
const imagebox1 = makeBox([200, 750], [680, 1070])
|
||||
const imagebox2 = makeBox([200, 1200], [680, 1520])
|
||||
|
||||
const imagebox3 = makeBox([700, 300], [1200, 600])
|
||||
const imagebox4 = makeBox([700, 850], [1200, 1050])
|
||||
const imagebox5 = makeBox([700, 1300], [1200, 1500])
|
||||
if (inRect(pos, pageupbox)) {
|
||||
//2代表当前最大页数-1
|
||||
if (page < 2) {
|
||||
@ -8848,30 +8855,144 @@ core.plugin.animate = {
|
||||
}
|
||||
} else if (inRect(pos, imagebox0)) {
|
||||
const img = core.material.images.images[this.UIMx[page][0][0]]
|
||||
ctx.save(); //保存设置
|
||||
ctx.translate(1248, 0) //重新定位右上角为基准
|
||||
ctx.rotate(Math.PI / 2) //旋转90度
|
||||
ctx.drawImage(img, 0, 0, 2028, 1248)
|
||||
ctx.restore(); //重置画布设置
|
||||
show = !show;
|
||||
} else {
|
||||
const pageupbox = makeBox([33, 342], [144, 129])
|
||||
const pagedownbox = makeBox([33, 837], [144, 138])
|
||||
if (inRect(pos, pageupbox)) {
|
||||
if (page < 2) {
|
||||
page++;
|
||||
core.clearMap(ctx);
|
||||
this.drawUI();
|
||||
}
|
||||
} else if (inRect(pos, pagedownbox)) {
|
||||
if (page > 0) {
|
||||
page++;
|
||||
core.clearMap(ctx);
|
||||
this.drawUI();
|
||||
}
|
||||
if (img) {
|
||||
ctx.save(); //保存设置
|
||||
ctx.translate(1248, 0) //重新定位右上角为基准
|
||||
ctx.rotate(Math.PI / 2) //旋转90度
|
||||
ctx.drawImage(img, 0, 0, 2028, 1248)
|
||||
ctx.restore(); //重置画布设置
|
||||
show = !show;
|
||||
}
|
||||
} else if (inRect(pos, imagebox1)) {
|
||||
const img = core.material.images.images[this.UIMx[page][0][1]]
|
||||
if (img) {
|
||||
ctx.save(); //保存设置
|
||||
ctx.translate(1248, 0) //重新定位右上角为基准
|
||||
ctx.rotate(Math.PI / 2) //旋转90度
|
||||
ctx.drawImage(img, 0, 0, 2028, 1248)
|
||||
ctx.restore(); //重置画布设置
|
||||
show = !show;
|
||||
}
|
||||
} else if (inRect(pos, imagebox2)) {
|
||||
const img = core.material.images.images[this.UIMx[page][0][2]]
|
||||
if (img) {
|
||||
ctx.save(); //保存设置
|
||||
ctx.translate(1248, 0) //重新定位右上角为基准
|
||||
ctx.rotate(Math.PI / 2) //旋转90度
|
||||
ctx.drawImage(img, 0, 0, 2028, 1248)
|
||||
ctx.restore(); //重置画布设置
|
||||
show = !show;
|
||||
}
|
||||
} else if (inRect(pos, imagebox3)) {
|
||||
console.log(3)
|
||||
const img = core.material.images.images[this.UIMx[page][1][0]]
|
||||
if (img) {
|
||||
ctx.save(); //保存设置
|
||||
ctx.translate(1248, 0) //重新定位右上角为基准
|
||||
ctx.rotate(Math.PI / 2) //旋转90度
|
||||
ctx.drawImage(img, 0, 0, 2028, 1248)
|
||||
ctx.restore(); //重置画布设置
|
||||
show = !show;
|
||||
}
|
||||
} else if (inRect(pos, imagebox4)) {
|
||||
const img = core.material.images.images[this.UIMx[page][1][1]]
|
||||
if (img) {
|
||||
ctx.save(); //保存设置
|
||||
ctx.translate(1248, 0) //重新定位右上角为基准
|
||||
ctx.rotate(Math.PI / 2) //旋转90度
|
||||
ctx.drawImage(img, 0, 0, 2028, 1248)
|
||||
ctx.restore(); //重置画布设置
|
||||
show = !show;
|
||||
}
|
||||
} else if (inRect(pos, imagebox5)) {
|
||||
const img = core.material.images.images[this.UIMx[page][1][2]]
|
||||
if (img) {
|
||||
ctx.save(); //保存设置
|
||||
ctx.translate(1248, 0) //重新定位右上角为基准
|
||||
ctx.rotate(Math.PI / 2) //旋转90度
|
||||
ctx.drawImage(img, 0, 0, 2028, 1248)
|
||||
ctx.restore(); //重置画布设置
|
||||
show = !show;
|
||||
}
|
||||
|
||||
}
|
||||
} else {
|
||||
const pageupbox = makeBox([33, 342], [144, 129])
|
||||
const pagedownbox = makeBox([33, 837], [144, 138])
|
||||
const imagebox0 = makeBox([300, 300], [780, 620])
|
||||
const imagebox1 = makeBox([800, 300], [1280, 620])
|
||||
const imagebox2 = makeBox([1300, 300], [1280, 620])
|
||||
|
||||
const imagebox3 = makeBox([300, 750], [780, 1070])
|
||||
const imagebox4 = makeBox([800, 750], [1280, 1070])
|
||||
const imagebox5 = makeBox([1300, 750], [1780, 1070])
|
||||
if (inRect(pos, pageupbox)) {
|
||||
if (page < 2) {
|
||||
page++;
|
||||
core.clearMap(ctx);
|
||||
this.drawUI();
|
||||
}
|
||||
} else if (inRect(pos, pagedownbox)) {
|
||||
if (page > 0) {
|
||||
page--;
|
||||
core.clearMap(ctx);
|
||||
this.drawUI();
|
||||
}
|
||||
} else if (inRect(pos, imagebox0)) {
|
||||
const img = core.material.images.images[this.UIMx[page][0][0]]
|
||||
if (img) {
|
||||
ctx.save(); //保存设置
|
||||
ctx.translate(0, 0) //重新定位右上角为基准
|
||||
ctx.drawImage(img, 0, 0, 2028, 1248)
|
||||
ctx.restore(); //重置画布设置
|
||||
show = !show;
|
||||
}
|
||||
} else if (inRect(pos, imagebox1)) {
|
||||
const img = core.material.images.images[this.UIMx[page][0][1]]
|
||||
if (img) {
|
||||
ctx.save(); //保存设置
|
||||
ctx.translate(0, 0) //重新定位右上角为基准
|
||||
ctx.drawImage(img, 0, 0, 2028, 1248)
|
||||
ctx.restore(); //重置画布设置
|
||||
show = !show;
|
||||
}
|
||||
} else if (inRect(pos, imagebox2)) {
|
||||
const img = core.material.images.images[this.UIMx[page][0][2]]
|
||||
if (img) {
|
||||
ctx.save(); //保存设置
|
||||
ctx.translate(0, 0) //重新定位右上角为基准
|
||||
ctx.drawImage(img, 0, 0, 2028, 1248)
|
||||
ctx.restore(); //重置画布设置
|
||||
show = !show;
|
||||
}
|
||||
} else if (inRect(pos, imagebox3)) {
|
||||
const img = core.material.images.images[this.UIMx[page][1][0]]
|
||||
if (img) {
|
||||
ctx.save(); //保存设置
|
||||
ctx.translate(0, 0) //重新定位右上角为基准
|
||||
ctx.drawImage(img, 0, 0, 2028, 1248)
|
||||
ctx.restore(); //重置画布设置
|
||||
show = !show;
|
||||
}
|
||||
} else if (inRect(pos, imagebox4)) {
|
||||
const img = core.material.images.images[this.UIMx[page][1][1]]
|
||||
if (img) {
|
||||
ctx.save(); //保存设置
|
||||
ctx.translate(0, 0) //重新定位右上角为基准
|
||||
ctx.drawImage(img, 0, 0, 2028, 1248)
|
||||
ctx.restore(); //重置画布设置
|
||||
show = !show;
|
||||
}
|
||||
} else if (inRect(pos, imagebox5)) {
|
||||
const img = core.material.images.images[this.UIMx[page][1][2]]
|
||||
if (img) {
|
||||
ctx.save(); //保存设置
|
||||
ctx.translate(0, 0) //重新定位右上角为基准
|
||||
ctx.drawImage(img, 0, 0, 2028, 1248)
|
||||
ctx.restore(); //重置画布设置
|
||||
show = !show;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
drawUI() {
|
||||
@ -8906,12 +9027,14 @@ core.plugin.animate = {
|
||||
}
|
||||
|
||||
// 添加浏览模式和CG模式的字样
|
||||
/*
|
||||
core.fillRoundRect(ctx, 350 - 6, 120 - 6, 120 + 12, 120 + 12, 6, '#444444');
|
||||
core.strokeRoundRect(ctx, 350 - 12, 120 - 12, 120 + 24, 120 + 12, 12, "#444444", 3);
|
||||
core.fillRoundRect(ctx, 950 - 6, 120 - 6, 120 + 12, 120 + 12, 6, '#444444');
|
||||
core.strokeRoundRect(ctx, 950 - 12, 120 - 12, 120 + 24, 120 + 12, 12, "#444444", 3);
|
||||
core.fillText(ctx, '浏览模式', 400, 180, '#FFFFFF', core.ui._buildFont(24, true));
|
||||
core.fillText(ctx, 'CG模式', 1000, 180, '#FFFFFF', core.ui._buildFont(24, true));
|
||||
*/
|
||||
} else { //横屏
|
||||
core.fillRect(ctx, 0, 0, 2028, 1248, "#000000") //黑色背景
|
||||
ctx.globalAlpha = 0.5 //透明度
|
||||
@ -8934,17 +9057,21 @@ core.plugin.animate = {
|
||||
// 添加3*2个4:3的画框
|
||||
for (let i = 0; i < 2; i++) {
|
||||
for (let j = 0; j < 3; j++) {
|
||||
core.fillRect(ctx, 300 + j * 500, 300 + i * 450, 480, 320, '#FFFFFF');
|
||||
core.strokeRect(ctx, 300 + j * 500, 300 + i * 450, 480, 320, "#444444", 2);
|
||||
const img = core.material.images.images[this.UIMx[page][i][j]]
|
||||
if (img) ctx.drawImage(img, 300 + j * 500 + 15, 300 + i * 450 + 15, 480 - 30, 320 - 30)
|
||||
}
|
||||
}
|
||||
|
||||
// 添加浏览模式和CG模式的字样
|
||||
/*
|
||||
core.fillRoundRect(ctx, 550 - 6, 45 - 6, 120 + 12, 120 + 12, 6, '#444444');
|
||||
core.strokeRoundRect(ctx, 550 - 12, 45 - 12, 120 + 24, 120 + 24, 12, "#444444", 3);
|
||||
core.fillText(ctx, '浏览模式', 600, 100, '#FFFFFF', core.ui._buildFont(24, true));
|
||||
core.fillRoundRect(ctx, 1150 - 6, 45 - 6, 120 + 12, 120 + 12, 6, '#444444');
|
||||
core.strokeRoundRect(ctx, 1150 - 12, 45 - 12, 120 + 24, 120 + 24, 12, "#444444", 3);
|
||||
core.fillText(ctx, 'CG模式', 1200, 100, '#FFFFFF', core.ui._buildFont(24, true))
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user