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