diff --git a/_server/editor_listen.js b/_server/editor_listen.js index ebbf0369..0707ec28 100644 --- a/_server/editor_listen.js +++ b/_server/editor_listen.js @@ -28,15 +28,15 @@ editor_listen_wrapper = function (editor) { editor.dom.iconLib.onmouseup = editor.uifunctions.material_onup editor.dom.iconLib.oncontextmenu = function (e) { e.preventDefault() } - editor.dom.extraEvent.onmousedown = editor.uifunctions.extraEvent_click - editor.dom.chooseThis.onmousedown = editor.uifunctions.chooseThis_click - editor.dom.chooseInRight.onmousedown = editor.uifunctions.chooseInRight_click - editor.dom.copyLoc.onmousedown = editor.uifunctions.copyLoc_click - editor.dom.pasteLoc.onmousedown = editor.uifunctions.pasteLoc_click - editor.dom.clearEvent.onmousedown = editor.uifunctions.clearEvent_click - editor.dom.clearLoc.onmousedown = editor.uifunctions.clearLoc_click + editor.dom.extraEvent.onmouseup = editor.uifunctions.extraEvent_click + editor.dom.chooseThis.onmouseup = editor.uifunctions.chooseThis_click + editor.dom.chooseInRight.onmouseup = editor.uifunctions.chooseInRight_click + editor.dom.copyLoc.onmouseup = editor.uifunctions.copyLoc_click + editor.dom.pasteLoc.onmouseup = editor.uifunctions.pasteLoc_click + editor.dom.clearEvent.onmouseup = editor.uifunctions.clearEvent_click + editor.dom.clearLoc.onmouseup = editor.uifunctions.clearLoc_click - editor.dom.lastUsed.onmousedown = editor.uifunctions.lastUsed_click; + editor.dom.lastUsed.onmouseup = editor.uifunctions.lastUsed_click; editor.dom.lastUsed.oncontextmenu = function (e) { e.preventDefault(); } editor.dom.clearLastUsedBtn.onclick = editor.uifunctions.clearLastUsedBtn_click; editor.dom.lockMode.onchange = editor.uifunctions.lockMode_onchange; diff --git a/_server/editor_mappanel.js b/_server/editor_mappanel.js index 4c95c61d..8237d950 100644 --- a/_server/editor_mappanel.js +++ b/_server/editor_mappanel.js @@ -436,13 +436,9 @@ editor_mappanel_wrapper = function (editor) { * 隐藏右键菜单 */ editor.uifunctions.hideMidMenu = function () { - if (editor.isMobile) { - setTimeout(function () { - editor.dom.midMenu.style = 'display:none'; - }, 200) - } else { + setTimeout(function () { editor.dom.midMenu.style = 'display:none'; - } + }, 100) } /** @@ -582,6 +578,8 @@ editor_mappanel_wrapper = function (editor) { editor.uifunctions.chooseThis_click = function (e) { editor.uifunctions.hideMidMenu(); e.stopPropagation(); + e.stopImmediatePropagation(); + e.preventDefault(); selectBox.isSelected(false); editor_mode.onmode('nextChange'); @@ -589,6 +587,7 @@ editor_mappanel_wrapper = function (editor) { //editor_mode.loc(); //tip.whichShow(1); if (editor.isMobile) editor.showdataarea(false); + return false; } /** @@ -598,8 +597,11 @@ editor_mappanel_wrapper = function (editor) { editor.uifunctions.chooseInRight_click = function (e) { editor.uifunctions.hideMidMenu(); e.stopPropagation(); + e.stopImmediatePropagation(); + e.preventDefault(); var thisevent = editor[editor.layerMod][editor.pos.y][editor.pos.x]; editor.setSelectBoxFromInfo(thisevent, true); + return false; } /** @@ -609,11 +611,12 @@ editor_mappanel_wrapper = function (editor) { editor.uifunctions.copyLoc_click = function (e) { editor.uifunctions.hideMidMenu(); e.stopPropagation(); + e.stopImmediatePropagation(); e.preventDefault(); editor_mode.onmode(''); editor.uivalues.copyedInfo = editor.copyFromPos(); printf('该点事件已复制'); - return; + return false; } /** @@ -623,10 +626,11 @@ editor_mappanel_wrapper = function (editor) { editor.uifunctions.pasteLoc_click = function (e) { editor.uifunctions.hideMidMenu(); e.stopPropagation(); + e.stopImmediatePropagation(); e.preventDefault(); if (!editor.uivalues.copyedInfo) { printe("没有复制的事件"); - return; + return false; } editor.savePreMap(); editor_mode.onmode(''); @@ -641,7 +645,7 @@ editor_mappanel_wrapper = function (editor) { editor.uifunctions.unhighlightSaveFloorButton(); editor.drawPosSelection(); }); - return; + return false; } /** @@ -650,8 +654,11 @@ editor_mappanel_wrapper = function (editor) { */ editor.uifunctions.clearEvent_click = function (e) { e.stopPropagation(); + e.stopImmediatePropagation(); + e.preventDefault(); editor.clearPos(false); editor.uifunctions.unhighlightSaveFloorButton(); + return false; } /** @@ -660,8 +667,11 @@ editor_mappanel_wrapper = function (editor) { */ editor.uifunctions.clearLoc_click = function (e) { e.stopPropagation(); + e.stopImmediatePropagation(); + e.preventDefault(); editor.clearPos(true); editor.uifunctions.unhighlightSaveFloorButton(); + return false; } /** @@ -845,7 +855,10 @@ editor_mappanel_wrapper = function (editor) { } editor.uifunctions.lastUsed_click = function (e) { - if (editor.isMobile) return; + e.preventDefault(); + e.stopImmediatePropagation(); + e.stopPropagation(); + if (editor.isMobile) return false; var scrollLeft = document.documentElement.scrollLeft || document.body.scrollLeft var scrollTop = document.documentElement.scrollTop || document.body.scrollTop diff --git a/_server/editor_mode.js b/_server/editor_mode.js index d7b8e728..7ebc5b95 100644 --- a/_server/editor_mode.js +++ b/_server/editor_mode.js @@ -57,7 +57,20 @@ editor_mode = function (editor) { printe(objs_.slice(-1)[0]); throw (objs_.slice(-1)[0]) } - ; printf('修改成功' + (data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d.firstData.name == 'template' ? '\n\n请注意:全塔属性的name尚未修改,请及时予以设置' : '')); + ; + var str = '修改成功!'; + if (data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d.firstData.name == 'template') + str += '\n请注意:全塔属性的name尚未修改,请及时予以设置。'; + if (mode == 'enemyitem') { + if (editor.info && editor.info.idnum) { + var block = editor.core.maps.blocksInfo[editor.info.idnum]; + if (block.doorInfo != null && block.doorInfo.keys != null && Object.keys(block.doorInfo.keys).length > 0 + && block.trigger != 'openDoor') { + str += "\n你修改了门信息,但触发器未改成openDoor,请修改否则无法撞击开门。" + } + } + } + printf(str); if (callback) callback(); } switch (mode) { diff --git a/_server/editor_table.js b/_server/editor_table.js index ddf31798..6e792a48 100644 --- a/_server/editor_table.js +++ b/_server/editor_table.js @@ -49,10 +49,11 @@ editor_table_wrapper = function (editor) { editor_table.prototype.checkboxSetMember = function (value,key,prefixString) { return /* html */`${prefixString}\n`; } - editor_table.prototype.editGrid = function (showComment, showEdit) { + editor_table.prototype.editGrid = function (showComment, showEdit, showCopy) { var list = []; if (showComment) list.push(""); - if (showEdit) list.push(""); + if (showEdit) list.push(""); + if (showCopy) list.push(""); return list.join(' '); } @@ -79,7 +80,7 @@ editor_table_wrapper = function (editor) {