From 7f7ad9a44a97731d7ff90baa612dadbd4a3e0171 Mon Sep 17 00:00:00 2001 From: YouWei Zhao Date: Thu, 24 May 2018 12:32:18 +0800 Subject: [PATCH] alertWhenCompress --- _server/editor_file.js | 9 +++++++++ editor.html | 3 +++ 2 files changed, 12 insertions(+) diff --git a/_server/editor_file.js b/_server/editor_file.js index 711a1bb1..82247ee0 100644 --- a/_server/editor_file.js +++ b/_server/editor_file.js @@ -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) { diff --git a/editor.html b/editor.html index 010fef99..c21f70bd 100644 --- a/editor.html +++ b/editor.html @@ -429,6 +429,7 @@ if (location.protocol.indexOf("http")!=0) {