alertWhenCompress
This commit is contained in:
parent
7301f703ef
commit
7f7ad9a44a
@ -104,6 +104,7 @@ editor_file = function (editor, callback) {
|
||||
}
|
||||
datastr = datastr.concat(['\n}']);
|
||||
datastr = datastr.join('');
|
||||
alertWhenCompress();
|
||||
fs.writeFile(filename, encode(datastr), 'base64', function (err, data) {
|
||||
callback(err);
|
||||
});
|
||||
@ -717,9 +718,17 @@ editor_file = function (editor, callback) {
|
||||
}))
|
||||
}
|
||||
|
||||
var alertWhenCompress = function(){
|
||||
if(editor.useCompress===true){
|
||||
editor.useCompress=null;
|
||||
setTimeout("alert('当前游戏使用的是压缩文件,修改完成后请重新压缩')",1000)
|
||||
}
|
||||
}
|
||||
|
||||
var saveSetting = function (file, actionList, callback) {
|
||||
//console.log(file);
|
||||
//console.log(actionList);
|
||||
alertWhenCompress();
|
||||
|
||||
if (file == 'icons') {
|
||||
actionList.forEach(function (value) {
|
||||
|
||||
@ -429,6 +429,7 @@ if (location.protocol.indexOf("http")!=0) {
|
||||
</script>
|
||||
<script src='_server/editor.js'></script>
|
||||
<script>
|
||||
var useCompress = main.useCompress;
|
||||
main.useCompress = false;
|
||||
main.init('editor', function () {
|
||||
editor.init(function () {
|
||||
@ -443,6 +444,8 @@ if (location.protocol.indexOf("http")!=0) {
|
||||
editor.mode.listen();
|
||||
editor_multi = editor_multi();
|
||||
editor_blockly = editor_blockly();
|
||||
editor.useCompress = useCompress;
|
||||
delete(useCompress);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user