右键反复弹窗;上下楼选点;放缩dom
This commit is contained in:
parent
5d553e399a
commit
fc5623514b
@ -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;
|
||||
|
||||
@ -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 {
|
||||
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
|
||||
|
||||
@ -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) {
|
||||
|
||||
@ -49,10 +49,11 @@ editor_table_wrapper = function (editor) {
|
||||
editor_table.prototype.checkboxSetMember = function (value,key,prefixString) {
|
||||
return /* html */`${prefixString}<input key='${key}' ctype='${typeof key}' type='checkbox' class='checkboxSetMember' onchange='editor.table.checkboxSetMemberOnchange(this)' ${(value ? 'checked ' : '')}/>\n`;
|
||||
}
|
||||
editor_table.prototype.editGrid = function (showComment, showEdit) {
|
||||
editor_table.prototype.editGrid = function (showComment, showEdit, showCopy) {
|
||||
var list = [];
|
||||
if (showComment) list.push("<button onclick='editor.table.onCommentBtnClick(this)'>注释</button>");
|
||||
if (showEdit) list.push("<button onclick='editor.table.onEditBtnClick(this)'>编辑</button>");
|
||||
if (showEdit) list.push("<button onclick='editor.table.onEditBtnClick(this)' style='background-color: #ddf8ff'>编辑</button>");
|
||||
if (showCopy) list.push("<button onclick='editor.table.onCopyBtnClick(this)'>复制</button>");
|
||||
return list.join(' ');
|
||||
}
|
||||
|
||||
@ -79,7 +80,7 @@ editor_table_wrapper = function (editor) {
|
||||
<td title="${field}">${shortField}</td>
|
||||
<td title="${commentHTMLescape}" cobj="${cobjstr}">${shortComment || commentHTMLescape}</td>
|
||||
<td><div class="etableInputDiv ${type}">${tdstr}</div></td>
|
||||
<td>${editor.table.editGrid(shortComment, type != 'select' && type != 'checkbox' && type != 'checkboxSet' && type != 'disable')}</td>
|
||||
<td>${editor.table.editGrid(shortComment, type != 'select' && type != 'checkbox' && type != 'checkboxSet' && type != 'disable', type == 'disable')}</td>
|
||||
</tr>\n`
|
||||
}
|
||||
|
||||
@ -416,6 +417,22 @@ editor_table_wrapper = function (editor) {
|
||||
if (cobj._type === 'textarea') editor_multi.import(guid, { lint: cobj._lint, string: cobj._string });
|
||||
if (cobj._type === 'material') editor.table.selectMaterial(input, cobj);
|
||||
if (cobj._type === 'color') editor.table.selectColor(input);
|
||||
if (cobj._type === 'point') editor.table.selectPoint(input);
|
||||
}
|
||||
|
||||
editor_table.prototype.onCopyBtnClick = function (button) {
|
||||
var tr = button.parentNode.parentNode;
|
||||
var input = tr.children[2].children[0].children[0];
|
||||
var value = JSON.parse(input.value);
|
||||
if (value == null) {
|
||||
printe('没有赋值的内容');
|
||||
return;
|
||||
}
|
||||
if (core.copy(value.toString())) {
|
||||
printf('复制成功!');
|
||||
} else {
|
||||
printe('无法复制此内容,请手动选择复制');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -431,6 +448,7 @@ editor_table_wrapper = function (editor) {
|
||||
if (cobj._type === 'textarea') editor_multi.import(guid, { lint: cobj._lint, string: cobj._string });
|
||||
if (cobj._type === 'material') editor.table.selectMaterial(input, cobj);
|
||||
if (cobj._type === 'color') editor.table.selectColor(input);
|
||||
if (cobj._type === 'point') editor.table.selectPoint(input);
|
||||
} else if (editor_mode.doubleClickMode === 'add') {
|
||||
editor_mode.doubleClickMode = 'change';
|
||||
editor.table.addfunc(guid, obj, commentObj, thisTr, input, field, cobj, modeNode)
|
||||
@ -466,6 +484,23 @@ editor_table_wrapper = function (editor) {
|
||||
})
|
||||
}
|
||||
|
||||
editor_table.prototype.selectPoint = function (input) {
|
||||
var x = 0, y = 0, value = input.value;
|
||||
if (value != null) {
|
||||
try {
|
||||
var loc = JSON.parse(value);
|
||||
if (loc instanceof Array && loc.length == 2) {
|
||||
x = loc[0];
|
||||
y = loc[1];
|
||||
}
|
||||
} catch (e) {}
|
||||
}
|
||||
editor.uievent.selectPoint(editor.currentFloorId, x, y, true, function (floorId, x, y) {
|
||||
input.value = '['+x+','+y+']';
|
||||
input.onchange();
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除表格项
|
||||
*/
|
||||
|
||||
@ -282,7 +282,7 @@ var comment_c456ea59_6018_45ef_8bcc_211a24c627dc = {
|
||||
"_type": "select",
|
||||
"_select": {
|
||||
"values": [
|
||||
"null",
|
||||
null,
|
||||
"openDoor",
|
||||
"pushBox",
|
||||
"ski",
|
||||
@ -446,14 +446,14 @@ var comment_c456ea59_6018_45ef_8bcc_211a24c627dc = {
|
||||
},
|
||||
"upFloor": {
|
||||
"_leaf": true,
|
||||
"_type": "textarea",
|
||||
"_type": "point",
|
||||
"_range": "thiseval==null||((thiseval instanceof Array) && thiseval.length==2)",
|
||||
"_docs": "上楼点",
|
||||
"_data": "该层上楼点,如[2,3]。\n如果此项不为null,则楼层转换时的stair:upFloor,以及楼传器的落点会被替换成该点而不是该层的上楼梯。"
|
||||
},
|
||||
"downFloor": {
|
||||
"_leaf": true,
|
||||
"_type": "textarea",
|
||||
"_type": "point",
|
||||
"_range": "thiseval==null||((thiseval instanceof Array) && thiseval.length==2)",
|
||||
"_docs": "下楼点",
|
||||
"_data": "该层下楼点,如[2,3]。\n如果此项不为null,则楼层转换时的stair:downFloor,以及楼传器的落点会被替换成该点而不是该层的下楼梯。"
|
||||
|
||||
@ -2721,6 +2721,9 @@ control.prototype._resize_gameGroup = function (obj) {
|
||||
floorMsgGroup.style = obj.globalAttribute.floorChangingStyle;
|
||||
floorMsgGroup.style.width = obj.outerSize - 2 * obj.BORDER + "px";
|
||||
floorMsgGroup.style.height = totalHeight - 2 * obj.BORDER + "px";
|
||||
floorMsgGroup.style.fontSize = 16 * core.domStyle.scale + "px";
|
||||
// startPanel
|
||||
core.dom.startPanel.style.fontSize = 16 * core.domStyle.scale + "px";
|
||||
// musicBtn
|
||||
if (core.domStyle.isVertical || core.domStyle.scale < 1) {
|
||||
core.dom.musicBtn.style.right = core.dom.musicBtn.style.bottom = "3px";
|
||||
|
||||
@ -231,6 +231,8 @@ core.prototype.init = function (coreData, callback) {
|
||||
core._afterLoadResources(callback);
|
||||
});
|
||||
});
|
||||
core.dom.musicBtn.style.display = 'block';
|
||||
core.setMusicBtn();
|
||||
}
|
||||
|
||||
core.prototype._init_flags = function () {
|
||||
|
||||
@ -2972,7 +2972,7 @@ events.prototype.checkLvUp = function () {
|
||||
}
|
||||
|
||||
events.prototype._checkLvUp_check = function () {
|
||||
if (core.flags.statusBarItems.indexOf('enableLevelUp')>=0 || !core.firstData.levelUp
|
||||
if (core.flags.statusBarItems.indexOf('enableLevelUp')<0 || !core.firstData.levelUp
|
||||
|| core.status.hero.lv >= core.firstData.levelUp.length) return null;
|
||||
// 计算下一个所需要的数值
|
||||
var next = (core.firstData.levelUp[core.status.hero.lv] || {});
|
||||
|
||||
BIN
project/fonts/number.ttf
Normal file
BIN
project/fonts/number.ttf
Normal file
Binary file not shown.
16
styles.css
16
styles.css
@ -17,7 +17,7 @@
|
||||
|
||||
#mainTips {
|
||||
color: #fff;
|
||||
font-size: 0.8rem;
|
||||
font-size: 0.8em;
|
||||
position: fixed;
|
||||
top: 10px;
|
||||
left: 10px;
|
||||
@ -72,7 +72,7 @@
|
||||
|
||||
#startTopLoadTips {
|
||||
color: #fff;
|
||||
font-size: 0.6rem;
|
||||
font-size: 0.6em;
|
||||
position: absolute;
|
||||
top: 10%;
|
||||
left: 5%;
|
||||
@ -85,7 +85,7 @@
|
||||
bottom: 0;
|
||||
left: 5%;
|
||||
z-index: 15;
|
||||
font-size: 18px;
|
||||
font-size: 1.1em;
|
||||
}
|
||||
|
||||
#startBackground {
|
||||
@ -108,7 +108,7 @@
|
||||
margin-top: 8%;
|
||||
max-width: 100%;
|
||||
text-align: center;
|
||||
font: bold 4rem STXingkai;
|
||||
font: bold 4em STXingkai;
|
||||
}
|
||||
|
||||
#startTitle {
|
||||
@ -120,7 +120,7 @@
|
||||
width: auto;
|
||||
position: absolute;
|
||||
text-align: center;
|
||||
font-size: 1.4rem;
|
||||
font-size: 1.4em;
|
||||
display: none;
|
||||
z-index: 310;
|
||||
bottom: 0;
|
||||
@ -176,20 +176,20 @@
|
||||
|
||||
#logoLabel {
|
||||
margin-top: 8%;
|
||||
font: bold 3rem STXingkai;
|
||||
font: bold 3em STXingkai;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
#versionLabel {
|
||||
margin-top: -3%;
|
||||
font-size: 1.2rem;
|
||||
font-size: 1.2em;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#floorNameLabel {
|
||||
margin-top: 30px;
|
||||
font-size: 1.6rem;
|
||||
font-size: 1.6em;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
|
||||
@ -69,7 +69,7 @@
|
||||
(已完成!) 合并main中一些设置内容
|
||||
(已完成!) \t[this], 勇士朝下,flag:arg清理,瞬移扣血
|
||||
(OK) 同步存档合并;(OK) 失去焦点右键;地图编辑框无效;(OK) 竖屏标题界面背景
|
||||
右键反复弹出;(OK) 画上下楼梯直接绑定楼传事件;(OK) 属性框出现0问题
|
||||
(OK) 右键反复弹出;(OK) 上下楼梯绑定楼传;(OK) 属性框出现0问题;(OK) 上下楼点选点
|
||||
|
||||
|
||||
-------------
|
||||
|
||||
Loading…
Reference in New Issue
Block a user