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