可以控制时间的滚动剧情
This commit is contained in:
parent
e35c59ebf5
commit
99b6550fe1
@ -1078,15 +1078,15 @@ return code;
|
||||
*/;
|
||||
|
||||
overlist_s
|
||||
: '背景' EvalString? '每句持续帧数' Int? '每句渐入渐出帧数' Int? BGNL? Newline
|
||||
: '背景' EvalString? '每句渐入渐出帧数' Int? BGNL? Newline
|
||||
overtextList+? Newline
|
||||
/*overlist_s
|
||||
tooltip : overlist:多行滚动旁白
|
||||
helpUrl : /_docs/#/instruction
|
||||
allImages : ['EvalString_0']
|
||||
default : ["bg_5043.png",50,30,[{ "text":"" ,"sound":"","textColor":"255,255,255,1","boldColor":"0,0,0,1","font":"bold 48px Verdana","frame":0}]]
|
||||
default : ["bg_5043.png",30,[{ "text":"" ,"sound":"","time":50,"textColor":"255,255,255,1","boldColor":"0,0,0,1","font":"bold 48px Verdana","frame":0}]]
|
||||
var list=',"list": [\n'+overtextList_0.slice(0,-1)+'\n]'
|
||||
var code = '{"type": "overlist", "image": "'+EvalString_0+'","time":'+Int_0+',"hidetime":'+Int_1+''+list+' },\n';
|
||||
var code = '{"type": "overlist", "image": "'+EvalString_0+'","hidetime":'+Int_0+''+list+' },\n';
|
||||
return code;
|
||||
*/;
|
||||
|
||||
@ -1096,16 +1096,16 @@ overtextList
|
||||
|
||||
overtext
|
||||
: '文字' EvalString? BGNL? Newline
|
||||
'音频文件(需注册)' EvalString? '文字颜色' ColorString? Colour '描边颜色' ColorString? Colour '字体信息' EvalString? Newline
|
||||
'音频文件(需注册)' EvalString? '显示帧数' Int? '文字颜色' ColorString? Colour '描边颜色' ColorString? Colour '字体信息' EvalString? Newline
|
||||
|
||||
/* overtext
|
||||
tooltip : 多行滚动字幕
|
||||
helpUrl : /_docs/#/instruction
|
||||
default : ["","","255,255,255,1",'rgba(255,255,255,1)',"0,0,0,1",'rgba(0,0,0,1)','bold 48px Verdana']
|
||||
default : ["","",50,"255,255,255,1",'rgba(255,255,255,1)',"0,0,0,1",'rgba(0,0,0,1)','bold 48px Verdana']
|
||||
colour : this.subColor
|
||||
allSounds : ['EvalString_1']
|
||||
|
||||
return '{ "text":"'+EvalString_0+'","sound": "'+EvalString_1+'","textColor": ['+ColorString_0+'],"boldColor": ['+ColorString_1+'],"font": "'+EvalString_2+'","frame":0},'
|
||||
return '{ "text":"'+EvalString_0+'","sound": "'+EvalString_1+'","time":'+Int_0+',"textColor": ['+ColorString_0+'],"boldColor": ['+ColorString_1+'],"font": "'+EvalString_2+'","frame":0},'
|
||||
*/;
|
||||
|
||||
overtextEmpty
|
||||
|
@ -683,10 +683,11 @@ MotaActionParser = function () {
|
||||
one[0],
|
||||
one[1],
|
||||
one[2],
|
||||
"rgba(" + one[2] + ")",
|
||||
one[3],
|
||||
"rgba(" + one[3] + ")",
|
||||
one[4],
|
||||
"rgba(" + one[4] + ")",
|
||||
one[5],
|
||||
res,
|
||||
]);
|
||||
}
|
||||
@ -694,7 +695,6 @@ MotaActionParser = function () {
|
||||
};
|
||||
this.next = MotaActionBlocks["overlist_s"].xmlText([
|
||||
data.image,
|
||||
data.time,
|
||||
data.hidetime,
|
||||
buildovertext(data.list),
|
||||
this.next,
|
||||
@ -2766,7 +2766,14 @@ MotaActionParser = function () {
|
||||
MotaActionFunctions.processovertext = function (overList) {
|
||||
var list = [];
|
||||
overList.forEach(function (one) {
|
||||
list.push([one.text, one.sound, one.textColor, one.boldColor, one.font]);
|
||||
list.push([
|
||||
one.text,
|
||||
one.sound,
|
||||
one.time,
|
||||
one.textColor,
|
||||
one.boldColor,
|
||||
one.font,
|
||||
]);
|
||||
});
|
||||
return list;
|
||||
};
|
||||
|
@ -42,12 +42,12 @@ main.floors.street01=
|
||||
{
|
||||
"type": "overlist",
|
||||
"image": "bg_5043.png",
|
||||
"time": 100,
|
||||
"hidetime": 60,
|
||||
"hidetime": 30,
|
||||
"list": [
|
||||
{
|
||||
"text": "这",
|
||||
"text": "试试",
|
||||
"sound": "",
|
||||
"time": 30,
|
||||
"textColor": [
|
||||
255,
|
||||
255,
|
||||
@ -64,8 +64,9 @@ main.floors.street01=
|
||||
"frame": 0
|
||||
},
|
||||
{
|
||||
"text": "是",
|
||||
"text": "这可以",
|
||||
"sound": "",
|
||||
"time": 50,
|
||||
"textColor": [
|
||||
255,
|
||||
255,
|
||||
@ -82,8 +83,9 @@ main.floors.street01=
|
||||
"frame": 0
|
||||
},
|
||||
{
|
||||
"text": "脏翅膀",
|
||||
"text": "变速的脏翅膀对话",
|
||||
"sound": "",
|
||||
"time": 80,
|
||||
"textColor": [
|
||||
255,
|
||||
255,
|
||||
@ -100,26 +102,9 @@ main.floors.street01=
|
||||
"frame": 0
|
||||
},
|
||||
{
|
||||
"text": "的",
|
||||
"sound": "",
|
||||
"textColor": [
|
||||
255,
|
||||
255,
|
||||
255,
|
||||
1
|
||||
],
|
||||
"boldColor": [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
1
|
||||
],
|
||||
"font": "bold 48px Verdana",
|
||||
"frame": 0
|
||||
},
|
||||
{
|
||||
"text": "文案",
|
||||
"text": "牛逼",
|
||||
"sound": "",
|
||||
"time": 20,
|
||||
"textColor": [
|
||||
255,
|
||||
255,
|
||||
|
@ -111,11 +111,11 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
||||
core.registerEvent("overlist", function (data) {
|
||||
core.overlist(
|
||||
data.image,
|
||||
data.time || 50,
|
||||
data.hidetime || 30,
|
||||
data.list || [{
|
||||
text: "",
|
||||
sound: "",
|
||||
time: 50,
|
||||
textColor: "#FFFFFF",
|
||||
boldColor: "#000000",
|
||||
font: "bold 48px Verdana",
|
||||
@ -9191,10 +9191,9 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
||||
MotaActionFunctions.actionParser.parseList([{
|
||||
type: "overlist",
|
||||
image: "bg_5043.png",
|
||||
time: 50,
|
||||
hidetime: 30,
|
||||
list: [
|
||||
{ text: "", sound: "", textColor: "255,255,255,1", boldColor: "0,0,0,1", font: "bold 48px Verdana", frame: 0 }
|
||||
{ text: "", sound: "", time: 50, textColor: "255,255,255,1", boldColor: "0,0,0,1", font: "bold 48px Verdana", frame: 0 }
|
||||
],
|
||||
}, ]),
|
||||
MotaActionFunctions.actionParser.parseList([{
|
||||
@ -11195,7 +11194,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
||||
core.fillRoundRect(
|
||||
"ui",
|
||||
15 - 2 + size - 4 + 35 + 8,
|
||||
60 - 2,
|
||||
59 - 2,
|
||||
37 + 4,
|
||||
(size - 58) / 2 + 4,
|
||||
4,
|
||||
@ -11204,7 +11203,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
||||
core.strokeRoundRect(
|
||||
"ui",
|
||||
15 - 4 + size - 4 + 35 + 8,
|
||||
60 - 4,
|
||||
59 - 4,
|
||||
37 + 8,
|
||||
(size - 58) / 2 + 8,
|
||||
4,
|
||||
@ -11226,7 +11225,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
||||
core.fillRoundRect(
|
||||
"ui",
|
||||
15 - 2 + size - 4 + 35 + 8,
|
||||
60 - 2 + (size - 58) / 2 + 8,
|
||||
59 - 2 + (size - 58) / 2 + 8,
|
||||
37 + 4,
|
||||
119 + 4,
|
||||
4,
|
||||
@ -11235,7 +11234,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
||||
core.strokeRoundRect(
|
||||
"ui",
|
||||
15 - 4 + size - 4 + 35 + 8,
|
||||
60 - 4 + (size - 58) / 2 + 8,
|
||||
59 - 4 + (size - 58) / 2 + 8,
|
||||
37 + 8,
|
||||
119 + 8,
|
||||
4,
|
||||
@ -11701,7 +11700,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
||||
actions.prototype._sys_onmousewheel,
|
||||
0
|
||||
);
|
||||
},
|
||||
},
|
||||
"CG回廊": function () {
|
||||
// 在此增加新插件
|
||||
const CGUI = document.createElement("canvas"); //CGui画布设置
|
||||
@ -13518,11 +13517,11 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
||||
|
||||
this.overlist = function (
|
||||
image,
|
||||
time = 50,
|
||||
hidetime = 30,
|
||||
list = [{
|
||||
text: "",
|
||||
sound: "",
|
||||
time: 50,
|
||||
textColor: "#FFFFFF",
|
||||
boldColor: "#000000",
|
||||
font: "bold 48px Verdana",
|
||||
@ -13565,7 +13564,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
||||
dy = 624;
|
||||
if (i === 0 && !list[1]) {
|
||||
core.over(image,
|
||||
time,
|
||||
a.time,
|
||||
hidetime,
|
||||
a.sound,
|
||||
a.textColor,
|
||||
@ -13573,11 +13572,10 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
||||
a.font,
|
||||
a.text)
|
||||
} else {
|
||||
|
||||
const numa = parseInt(a?.font?.replace(/[^\d]/g, " ").replace(" ", "")) || 48;
|
||||
const numb = parseInt(b?.font?.replace(/[^\d]/g, " ").replace(" ", "")) || 48;
|
||||
const numc = parseInt(c?.font?.replace(/[^\d]/g, " ").replace(" ", "")) || 48;
|
||||
const numd = parseInt(d?.font?.replace(/[^\d]/g, " ").replace(" ", "")) || 48;
|
||||
const numa = parseInt(a?.font?.replace(/[^\d]/g, " ").trim()) || 48;
|
||||
const numb = parseInt(b?.font?.replace(/[^\d]/g, " ").trim()) || 48;
|
||||
const numc = parseInt(c?.font?.replace(/[^\d]/g, " ").trim()) || 48;
|
||||
const numd = parseInt(d?.font?.replace(/[^\d]/g, " ").trim()) || 48;
|
||||
|
||||
// 绘制
|
||||
if (a) {
|
||||
@ -13641,7 +13639,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
||||
}
|
||||
const lisenb = b.sound && core.material.sounds[b.sound] && core.musicStatus.soundStatus;
|
||||
if (b.frame && lisenb) { sod = core.playSound(sound); }
|
||||
if (b.frame > hidetime && b.frame < hidetime + time) {
|
||||
if (b.frame > hidetime && b.frame < hidetime + b.time) {
|
||||
b.frame++
|
||||
ctx.globalAlpha = 1;
|
||||
core.setTextAlign(ctx, "center");
|
||||
@ -13659,7 +13657,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
||||
|
||||
}
|
||||
|
||||
if (b.frame == hidetime + time) {
|
||||
if (b.frame == hidetime + b.time) {
|
||||
ctx.globalAlpha = 1;
|
||||
core.setTextAlign(ctx, "center");
|
||||
core.fillBoldText1(
|
||||
@ -13679,10 +13677,10 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
||||
}
|
||||
}
|
||||
if (c) {
|
||||
if (c.frame > hidetime + time && c.frame < hidetime * 3 / 2 + time) {
|
||||
if (c.frame > hidetime + c.time && c.frame < hidetime * 3 / 2 + c.time) {
|
||||
c.frame++;
|
||||
core.setAlpha(ctx, 1 - (c.frame - hidetime - time) / hidetime)
|
||||
cy -= (numc * (c.frame - hidetime - time)) / hidetime * 3;
|
||||
core.setAlpha(ctx, 1 - (c.frame - hidetime - c.time) / hidetime)
|
||||
cy -= (numc * (c.frame - hidetime - c.time)) / hidetime * 3;
|
||||
core.setTextAlign(ctx, "center");
|
||||
core.fillBoldText1(
|
||||
ctx,
|
||||
@ -13695,9 +13693,9 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
||||
c.font
|
||||
);
|
||||
}
|
||||
if (c.frame === hidetime * 3 / 2 + time) {
|
||||
core.setAlpha(ctx, 1 - (c.frame - hidetime - time) / hidetime)
|
||||
cy = 624 - (numc * (c.frame - hidetime - time)) / hidetime * 3;
|
||||
if (c.frame === hidetime * 3 / 2 + c.time) {
|
||||
core.setAlpha(ctx, 1 - (c.frame - hidetime - c.time) / hidetime)
|
||||
cy = 624 - (numc * (c.frame - hidetime - c.time)) / hidetime * 3;
|
||||
core.setTextAlign(ctx, "center");
|
||||
core.fillBoldText1(
|
||||
ctx,
|
||||
@ -13717,10 +13715,10 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
||||
}
|
||||
}
|
||||
if (d) {
|
||||
if (d.frame > hidetime * 3 / 2 + time && d.frame < hidetime * 2 + time) {
|
||||
if (d.frame > hidetime * 3 / 2 + d.time && d.frame < hidetime * 2 + d.time) {
|
||||
d.frame++;
|
||||
core.setAlpha(ctx, 1 - (d.frame - hidetime - time) / hidetime)
|
||||
dy -= (numd * (d.frame - hidetime - time)) / hidetime * 3;
|
||||
core.setAlpha(ctx, 1 - (d.frame - hidetime - d.time) / hidetime)
|
||||
dy -= (numd * (d.frame - hidetime - d.time)) / hidetime * 3;
|
||||
core.setTextAlign(ctx, "center");
|
||||
core.fillBoldText1(
|
||||
ctx,
|
||||
@ -13733,7 +13731,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
||||
d.font
|
||||
);
|
||||
}
|
||||
if (d.frame == hidetime * 2 + time && !c) {
|
||||
if (d.frame == hidetime * 2 + d.time && !c) {
|
||||
core.unregisterAnimationFrame("overlist");
|
||||
ctx.restore();
|
||||
over.style.display = "none";
|
||||
|
Loading…
Reference in New Issue
Block a user