diff --git a/_server/MotaAction.g4 b/_server/MotaAction.g4 index 291180ff..419688ce 100644 --- a/_server/MotaAction.g4 +++ b/_server/MotaAction.g4 @@ -3204,7 +3204,7 @@ ActionParser.prototype.parseAction = function() { break; case "autoSave": // 自动存档 this.next = MotaActionBlocks['autoSave_s'].xmlText([ - this.nohint, this.next]); + data.nohint||false, this.next]); break; case "callLoad": // 呼出读档界面 this.next = MotaActionBlocks['callLoad_s'].xmlText([ diff --git a/_server/css/editor.css b/_server/css/editor.css index dd9c0e18..f4a372cf 100644 --- a/_server/css/editor.css +++ b/_server/css/editor.css @@ -458,4 +458,53 @@ table.row td { left: 6px; top: 6px; background-image:url('data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIGJhc2VQcm9maWxlPSJmdWxsIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWxuczpldj0iaHR0cDovL3d3dy53My5vcmcvMjAwMS94bWwtZXZlbnRzIj4KPGc%2BCgk8cG9seWdvbiBmaWxsPSIjNjY2IiBwb2ludHM9IjkuMjA3LDYuMTI2IDcuNzkzLDcuNTQxIDExLjc5MywxMS41NDEgMTMuMjA3LDEwLjEyNiIgLz4KCTxwYXRoIGZpbGw9IiM2NjYiIGQ9Ik01LjkxNywyYzEuNjA4LDAsMi45MTcsMS4zMDgsMi45MTcsMi45MTdTNy41MjUsNy44MzMsNS45MTcsNy44MzNTMyw2LjUyNSwzLDQuOTE3UzQuMzA4LDIsNS45MTcsMgoJCSBNNS45MTcsMEMzLjIwMSwwLDEsMi4yMDEsMSw0LjkxN3MyLjIwMSw0LjkxNyw0LjkxNyw0LjkxN3M0LjkxNy0yLjIwMSw0LjkxNy00LjkxN0MxMC44MzMsMi4yMDEsOC42MzIsMCw1LjkxNywwTDUuOTE3LDB6IiAvPgo8L2c%2BCjwvc3ZnPgo%3D'); +} + +#uieventDiv { + display: none; + width: 100%; + height: 100%; + position: fixed; + top: 0; + left: 0; + background: rgba(127,127,127,0.6); + z-index: 2000 +} + +#uieventDialog { + position: fixed; + top: 50%; + left: 50%; + transform: translate(-50%, -60%); + background: white; + width: 436px; +} + +#uieventHead { + margin: 10px 20px; +} + +#uieventTitle { + font-weight: bold; +} + +#uieventNo { + float: right; +} + +#uieventYes { + display: none; + float: right; + margin-right: 15px; +} + +#uievent { + width: 416px; + height: 416px; + position: relative; + margin-left: 10px; +} + +#selectPoint { + display: none; } \ No newline at end of file diff --git a/_server/editor_unsorted_3.js b/_server/editor_unsorted_3.js index 170238e9..3c106459 100644 --- a/_server/editor_unsorted_3.js +++ b/_server/editor_unsorted_3.js @@ -367,3 +367,54 @@ selectBox.isSelected=function(value){ return selectBox._isSelected } +// ------ UI预览 & 地图选点相关 ------ // + +uievent = {}; + +uievent.uieventDiv = document.getElementById('uieventDiv'); + +uievent.uieventNo = document.getElementById('uieventNo'); +uievent.uieventNo.onclick = function () { + uievent.close(); +} + +uievent.uieventYes = document.getElementById('uieventYes'); +uievent.uieventYes.onclick = function () { + uievent.close(); + if (uievent.callback) { + uievent.callback(uievent.floorId, uievent.x, uievent.y); + } + delete uievent.callback; +} + +uievent.title = document.getElementById('uieventTitle'); +uievent.selectPoint = document.getElementById('selectPoint'); + +uievent.close = function () { + uievent.isOpen = false; + uievent.uieventDiv.style.display = 'none'; +} + +uievent.previewUI = function (list) { + uievent.isOpen = true; + uievent.uieventDiv.style.display = 'block'; + uievent.mode = 'previewUI'; + uievent.selectPoint.style.display = 'none'; + uievent.uieventYes.style.display = 'none'; + uievent.title.innerText = 'UI绘制预览'; + + core.clearMap('uievent'); + + // 绘制UI + core.drawThumbnail(editor.currentFloorId, null, {}, 'uievent'); + if (list instanceof Array) { + list.forEach(function (data) { + var type = data.type; + if (!type || !core.ui["_uievent_"+type]) return; + core.ui["_uievent_"+type](data); + }) + } +} + + + diff --git a/editor-mobile.html b/editor-mobile.html index 67db31dd..33c1f152 100644 --- a/editor-mobile.html +++ b/editor-mobile.html @@ -514,7 +514,7 @@ 此浏览器不支持HTML5 -