commit
c35e9f70af
@ -1706,6 +1706,7 @@ core.drawTip(text, id)
|
||||
在左上角以气泡的形式绘制一段提示。
|
||||
text为文字内容,仅支持${}的表达式计算,不支持换行和变色。
|
||||
id可选,为同时绘制的图标ID,如果不为null则会同时绘制该图标(仅对32x32的素材有效)。
|
||||
也可以使用状态栏的图标ID,例如lv, hp, up, save, settings等。
|
||||
|
||||
|
||||
core.drawText(content, callback)
|
||||
|
||||
@ -673,11 +673,11 @@ function omitedcheckUpdateFunction(event) {
|
||||
|
||||
var searchInput = document.getElementById("searchBlock");
|
||||
searchInput.onfocus = function () {
|
||||
editor_blockly.reopenToolbox(9);
|
||||
editor_blockly.reopenToolbox(10);
|
||||
}
|
||||
|
||||
searchInput.oninput = function () {
|
||||
editor_blockly.reopenToolbox(9);
|
||||
editor_blockly.reopenToolbox(10);
|
||||
}
|
||||
|
||||
editor_blockly.searchBlock = function (value) {
|
||||
|
||||
@ -1480,29 +1480,21 @@ control.prototype._replayAction_key = function (action) {
|
||||
|
||||
////// 自动存档 //////
|
||||
control.prototype.autosave = function (removeLast) {
|
||||
var inEvent = false; // 检测是否是事件中的自动存档
|
||||
if (core.status.event.id!=null) {
|
||||
if (core.status.event.id!='action') return;
|
||||
inEvent = true;
|
||||
}
|
||||
var x=null;
|
||||
if (removeLast) x=core.status.route.pop();
|
||||
if (inEvent) {
|
||||
core.setFlag("__events__", core.clone(core.status.event.data));
|
||||
}
|
||||
else {
|
||||
if (removeLast) {
|
||||
x=core.status.route.pop();
|
||||
core.status.route.push("turn:"+core.getHeroLoc('direction'));
|
||||
}
|
||||
if (core.status.event.id == 'action') // 事件中的自动存档
|
||||
core.setFlag("__events__", core.clone(core.status.event.data));
|
||||
core.saves.autosave.data = core.saveData();
|
||||
core.saves.autosave.updated = true;
|
||||
core.saves.ids[0] = true;
|
||||
if (inEvent) {
|
||||
core.removeFlag("__events__");
|
||||
}
|
||||
else {
|
||||
core.removeFlag("__events__");
|
||||
if (removeLast) {
|
||||
core.status.route.pop();
|
||||
if (x) core.status.route.push(x);
|
||||
}
|
||||
if (x) core.status.route.push(x);
|
||||
}
|
||||
|
||||
/////// 实际进行自动存档 //////
|
||||
|
||||
@ -275,7 +275,13 @@ ui.prototype.drawTip = function (text, id) {
|
||||
core.setTextAlign('data', 'left');
|
||||
if (id != null) {
|
||||
var info = core.getBlockInfo(id);
|
||||
if (info == null || !info.image || info.height != 32) id = null;
|
||||
if (info == null || !info.image || info.height != 32) {
|
||||
// 检查状态栏图标
|
||||
if (core.statusBar.icons[id] instanceof Image) {
|
||||
id = {image: core.statusBar.icons[id], posX: 0, posY: 0};
|
||||
}
|
||||
else id = null;
|
||||
}
|
||||
else id = info;
|
||||
}
|
||||
if (!id) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user