lockMode
This commit is contained in:
parent
ee025ad7b0
commit
9f8f4eaa49
@ -55,6 +55,7 @@ function editor() {
|
||||
lastUsedDiv: document.getElementById('lastUsedDiv'),
|
||||
lastUsed: document.getElementById('lastUsed'),
|
||||
lastUsedCtx: document.getElementById('lastUsed').getContext('2d'),
|
||||
lockMode: document.getElementById('lockMode'),
|
||||
};
|
||||
|
||||
this.uivalues={
|
||||
@ -98,6 +99,7 @@ function editor() {
|
||||
|
||||
// tile
|
||||
tileSize: [1,1],
|
||||
lockMode: false,
|
||||
|
||||
// 最近使用的图块
|
||||
lastUsed: [],
|
||||
|
||||
@ -35,6 +35,7 @@ editor_listen_wrapper = function (editor) {
|
||||
editor.dom.clearLoc.onmousedown = editor.uifunctions.clearLoc_click
|
||||
|
||||
editor.dom.lastUsed.onmousedown = editor.uifunctions.lastUsed_click;
|
||||
editor.dom.lockMode.onchange = editor.uifunctions.lockMode_onchange;
|
||||
|
||||
editor.dom.brushMod.onchange = editor.uifunctions.brushMod_onchange
|
||||
if (editor.dom.brushMod2) editor.dom.brushMod2.onchange = editor.uifunctions.brushMod2_onchange;
|
||||
|
||||
@ -570,6 +570,16 @@ editor_mappanel_wrapper = function (editor) {
|
||||
editor.clearPos(true);
|
||||
}
|
||||
|
||||
/**
|
||||
* editor.dom.lockMode.onchange
|
||||
* 点击【】
|
||||
*/
|
||||
editor.uifunctions.lockMode_onchange = function () {
|
||||
tip.msgs[11] = String('锁定模式开启下将不再点击空白处自动保存,请谨慎操作。');
|
||||
tip.whichShow(12);
|
||||
editor.uivalues.lockMode = editor.dom.lockMode.checked;
|
||||
}
|
||||
|
||||
/**
|
||||
* editor.dom.brushMod.onchange
|
||||
* 切换画笔模式
|
||||
@ -591,7 +601,10 @@ editor_mappanel_wrapper = function (editor) {
|
||||
* 切换画笔模式
|
||||
*/
|
||||
editor.uifunctions.brushMod3_onchange = function () {
|
||||
alert("从V2.6.6开始,tileset贴图模式已被废弃。\n请右键额外素材,并输入所需要绘制的宽高,然后单击地图以绘制一个区域。");
|
||||
if (!core.getLocalStorage('alertTileMode') &&
|
||||
!confirm("从V2.6.6开始,tileset贴图模式已被废弃。\n请右键额外素材,并输入所需要绘制的宽高,然后单击地图以绘制一个区域。\n\n点取消将不再显示此提示。")) {
|
||||
core.setLocalStorage('alertTileMode', true);
|
||||
}
|
||||
// tip.showHelp(5)
|
||||
tip.isSelectedBlock(false)
|
||||
tip.msgs[11] = String('tileset贴图模式下可以按选中tileset素材,并在地图上拖动来一次绘制一个区域');
|
||||
|
||||
@ -48,7 +48,7 @@ editor_ui_wrapper = function (editor) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (unselect) {
|
||||
if (unselect && !editor.uivalues.lockMode) {
|
||||
if (clickpath.indexOf('eui') === -1 && clickpath.indexOf('lastUsed') === -1) {
|
||||
if (selectBox.isSelected()) {
|
||||
editor_mode.onmode('');
|
||||
|
||||
@ -374,6 +374,7 @@
|
||||
<option value="commonevent">公共事件</option>
|
||||
<option value="plugins">插件编写</option>
|
||||
</select>
|
||||
<span style="font-size: 12px"><input type="checkbox" id="lockMode"/>锁定模式</span>
|
||||
<select id="brushMod" style="clear:right">
|
||||
<option value="line">画线</option>
|
||||
<option value="rectangle">画矩形</option>
|
||||
|
||||
@ -333,6 +333,7 @@
|
||||
<option value="commonevent">公共事件</option>
|
||||
<option value="plugins">插件编写</option>
|
||||
</select>
|
||||
<span style="font-size: 12px"><input type="checkbox" id="lockMode"/>锁定模式</span>
|
||||
<br/>
|
||||
<span style="font-size: 12px;">
|
||||
<input type="radio" id="brushMod" name="brushMod" value="line" checked="checked" />画线
|
||||
|
||||
Loading…
Reference in New Issue
Block a user