Fix drawTextBox animation
This commit is contained in:
parent
5e78501f84
commit
e3e8546d03
@ -1025,9 +1025,13 @@ actions.prototype._clickAction = function (x, y, px, py) {
|
|||||||
// 正在淡入淡出的话不执行
|
// 正在淡入淡出的话不执行
|
||||||
if (core.status.event.animateUI) return;
|
if (core.status.event.animateUI) return;
|
||||||
|
|
||||||
|
var data = core.clone(core.status.event.data.current);
|
||||||
|
if (typeof data == 'string') data = { "type": "text", "text": data };
|
||||||
|
|
||||||
// 打字机效果显示全部文字
|
// 打字机效果显示全部文字
|
||||||
if (core.status.event.interval != null) {
|
if (core.status.event.interval != null) {
|
||||||
core.insertAction({"type": "text", "text": core.status.event.ui, "showAll": true});
|
data.showAll = true;
|
||||||
|
core.insertAction(data);
|
||||||
core.doAction();
|
core.doAction();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -1124,10 +1128,13 @@ actions.prototype._keyUpAction = function (keycode) {
|
|||||||
// 正在淡入淡出的话不执行
|
// 正在淡入淡出的话不执行
|
||||||
if (core.status.event.animateUI) return;
|
if (core.status.event.animateUI) return;
|
||||||
|
|
||||||
|
var data = core.clone(core.status.event.data.current);
|
||||||
|
if (typeof data == 'string') data = { "type": "text", "text": data };
|
||||||
|
|
||||||
// 打字机效果显示全部文字
|
// 打字机效果显示全部文字
|
||||||
if (core.status.event.interval != null) {
|
if (core.status.event.interval != null) {
|
||||||
core.insertAction({"type": "text", "text": core.status.event.ui, "showAll": true});
|
data.showAll = true;
|
||||||
core.doAction();
|
core.insertAction(data);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
core.ui._animateUI('hide', core.doAction);
|
core.ui._animateUI('hide', core.doAction);
|
||||||
|
|||||||
@ -814,7 +814,7 @@ ui.prototype._getPosition = function (content) {
|
|||||||
px = core.status.event.data.x;
|
px = core.status.event.data.x;
|
||||||
py = core.status.event.data.y;
|
py = core.status.event.data.y;
|
||||||
}
|
}
|
||||||
if (editor.mode != 'play') {
|
if (main.mode != 'play') {
|
||||||
px = editor.pos.x;
|
px = editor.pos.x;
|
||||||
py = editor.pos.y;
|
py = editor.pos.y;
|
||||||
}
|
}
|
||||||
@ -1413,8 +1413,6 @@ ui.prototype._animateUI = function (type, callback) {
|
|||||||
////// 绘制一个对话框 //////
|
////// 绘制一个对话框 //////
|
||||||
ui.prototype.drawTextBox = function(content, config) {
|
ui.prototype.drawTextBox = function(content, config) {
|
||||||
config = config || {};
|
config = config || {};
|
||||||
if (core.status.event && core.status.event.id == 'action')
|
|
||||||
core.status.event.ui = content;
|
|
||||||
|
|
||||||
this.clearUI();
|
this.clearUI();
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user