highlight savefloor button
This commit is contained in:
parent
c2f8c37983
commit
fa61c25cf8
@ -282,6 +282,7 @@ editor.prototype.changeFloor = function (floorId, callback) {
|
|||||||
editor.viewportLoc = editor.viewportLoc || {};
|
editor.viewportLoc = editor.viewportLoc || {};
|
||||||
var loc = editor.viewportLoc[floorId] || [], x = loc[0] || 0, y = loc[1] || 0;
|
var loc = editor.viewportLoc[floorId] || [], x = loc[0] || 0, y = loc[1] || 0;
|
||||||
editor.setViewport(x, y);
|
editor.setViewport(x, y);
|
||||||
|
editor.uifunctions.unhighlightSaveFloorButton();
|
||||||
|
|
||||||
editor.config.set('editorLastFloorId', floorId, function() {
|
editor.config.set('editorLastFloorId', floorId, function() {
|
||||||
if (callback) callback();
|
if (callback) callback();
|
||||||
|
|||||||
@ -274,6 +274,7 @@ editor_mappanel_wrapper = function (editor) {
|
|||||||
editor.uivalues.holdingPath = 0;
|
editor.uivalues.holdingPath = 0;
|
||||||
editor.uivalues.stepPostfix = [];
|
editor.uivalues.stepPostfix = [];
|
||||||
editor.dom.euiCtx.clearRect(0, 0, core.__PIXELS__, core.__PIXELS__);
|
editor.dom.euiCtx.clearRect(0, 0, core.__PIXELS__, core.__PIXELS__);
|
||||||
|
editor.uifunctions.highlightSaveFloorButton();
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -465,6 +466,7 @@ editor_mappanel_wrapper = function (editor) {
|
|||||||
editor.drawEventBlock();
|
editor.drawEventBlock();
|
||||||
editor_mode.showMode('loc');
|
editor_mode.showMode('loc');
|
||||||
printf('添加楼梯事件成功');
|
printf('添加楼梯事件成功');
|
||||||
|
editor.uifunctions.unhighlightSaveFloorButton();
|
||||||
});
|
});
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -525,6 +527,7 @@ editor_mappanel_wrapper = function (editor) {
|
|||||||
editor.drawPosSelection();
|
editor.drawPosSelection();
|
||||||
editor_mode.showMode('loc');
|
editor_mode.showMode('loc');
|
||||||
printf('绑定机关门事件成功');
|
printf('绑定机关门事件成功');
|
||||||
|
editor.uifunctions.unhighlightSaveFloorButton();
|
||||||
});
|
});
|
||||||
bindSpecialDoor.loc = null;
|
bindSpecialDoor.loc = null;
|
||||||
bindSpecialDoor.enemys = [];
|
bindSpecialDoor.enemys = [];
|
||||||
@ -577,6 +580,7 @@ editor_mappanel_wrapper = function (editor) {
|
|||||||
throw (err)
|
throw (err)
|
||||||
}
|
}
|
||||||
; printf('复制事件成功');
|
; printf('复制事件成功');
|
||||||
|
editor.uifunctions.unhighlightSaveFloorButton();
|
||||||
editor.drawPosSelection();
|
editor.drawPosSelection();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -591,6 +595,7 @@ editor_mappanel_wrapper = function (editor) {
|
|||||||
editor.savePreMap();
|
editor.savePreMap();
|
||||||
editor_mode.onmode('');
|
editor_mode.onmode('');
|
||||||
editor.exchangePos(editor.pos, editor.uivalues.lastRightButtonPos[1]);
|
editor.exchangePos(editor.pos, editor.uivalues.lastRightButtonPos[1]);
|
||||||
|
editor.uifunctions.unhighlightSaveFloorButton();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -600,6 +605,7 @@ editor_mappanel_wrapper = function (editor) {
|
|||||||
editor.uifunctions.clearEvent_click = function (e) {
|
editor.uifunctions.clearEvent_click = function (e) {
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
editor.clearPos(false);
|
editor.clearPos(false);
|
||||||
|
editor.uifunctions.unhighlightSaveFloorButton();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -609,6 +615,7 @@ editor_mappanel_wrapper = function (editor) {
|
|||||||
editor.uifunctions.clearLoc_click = function (e) {
|
editor.uifunctions.clearLoc_click = function (e) {
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
editor.clearPos(true);
|
editor.clearPos(true);
|
||||||
|
editor.uifunctions.unhighlightSaveFloorButton();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -765,6 +772,15 @@ editor_mappanel_wrapper = function (editor) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
editor.uifunctions.highlightSaveFloorButton=function(){
|
||||||
|
var saveFloor = document.getElementById('saveFloor');
|
||||||
|
saveFloor.style.background='#FFCCAA';
|
||||||
|
}
|
||||||
|
|
||||||
|
editor.uifunctions.unhighlightSaveFloorButton=function(){
|
||||||
|
var saveFloor = document.getElementById('saveFloor');
|
||||||
|
saveFloor.style.background='';
|
||||||
|
}
|
||||||
|
|
||||||
editor.uifunctions.saveFloor_func = function () {
|
editor.uifunctions.saveFloor_func = function () {
|
||||||
var saveFloor = document.getElementById('saveFloor');
|
var saveFloor = document.getElementById('saveFloor');
|
||||||
@ -776,6 +792,7 @@ editor_mappanel_wrapper = function (editor) {
|
|||||||
throw (err)
|
throw (err)
|
||||||
}
|
}
|
||||||
; printf('保存成功');
|
; printf('保存成功');
|
||||||
|
editor.uifunctions.unhighlightSaveFloorButton()
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
saveFloor.onclick = editor_mode.saveFloor;
|
saveFloor.onclick = editor_mode.saveFloor;
|
||||||
|
|||||||
@ -318,6 +318,7 @@ editor_ui_wrapper = function (editor) {
|
|||||||
editor.bgmap = JSON.parse(JSON.stringify(data.bgmap));
|
editor.bgmap = JSON.parse(JSON.stringify(data.bgmap));
|
||||||
editor.updateMap();
|
editor.updateMap();
|
||||||
editor.uivalues.postMapData.push(data);
|
editor.uivalues.postMapData.push(data);
|
||||||
|
editor.uifunctions.highlightSaveFloorButton();
|
||||||
printf("已撤销此操作,你可能需要重新保存地图。");
|
printf("已撤销此操作,你可能需要重新保存地图。");
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
@ -332,6 +333,7 @@ editor_ui_wrapper = function (editor) {
|
|||||||
editor.bgmap = JSON.parse(JSON.stringify(data.bgmap));
|
editor.bgmap = JSON.parse(JSON.stringify(data.bgmap));
|
||||||
editor.updateMap();
|
editor.updateMap();
|
||||||
editor.uivalues.preMapData.push(data);
|
editor.uivalues.preMapData.push(data);
|
||||||
|
editor.uifunctions.highlightSaveFloorButton();
|
||||||
printf("已重做此操作,你可能需要重新保存地图。");
|
printf("已重做此操作,你可能需要重新保存地图。");
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
@ -349,6 +351,7 @@ editor_ui_wrapper = function (editor) {
|
|||||||
editor.uivalues.copyedInfo = editor.copyFromPos();
|
editor.uivalues.copyedInfo = editor.copyFromPos();
|
||||||
editor.clearPos(true, null, function () {
|
editor.clearPos(true, null, function () {
|
||||||
printf('该点事件已剪切');
|
printf('该点事件已剪切');
|
||||||
|
editor.uifunctions.unhighlightSaveFloorButton();
|
||||||
})
|
})
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -366,6 +369,7 @@ editor_ui_wrapper = function (editor) {
|
|||||||
throw (err)
|
throw (err)
|
||||||
}
|
}
|
||||||
; printf('粘贴事件成功');
|
; printf('粘贴事件成功');
|
||||||
|
editor.uifunctions.unhighlightSaveFloorButton();
|
||||||
editor.drawPosSelection();
|
editor.drawPosSelection();
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
@ -373,6 +377,7 @@ editor_ui_wrapper = function (editor) {
|
|||||||
// DELETE
|
// DELETE
|
||||||
if (e.keyCode == 46 && !selectBox.isSelected()) {
|
if (e.keyCode == 46 && !selectBox.isSelected()) {
|
||||||
editor.clearPos(true);
|
editor.clearPos(true);
|
||||||
|
editor.uifunctions.unhighlightSaveFloorButton();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// ESC
|
// ESC
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user