editor-airwall
This commit is contained in:
parent
17266c9f7e
commit
21ab8a4450
@ -366,6 +366,18 @@ editor.prototype.drawInitData = function (icons) {
|
||||
for (var ii = 0; ii < imgNames.length; ii++) {
|
||||
var img = imgNames[ii];
|
||||
if (img == 'terrains') {
|
||||
(function(image,dc,nowx){
|
||||
if (image.complete) {
|
||||
dc.drawImage(image, nowx, 32);
|
||||
core.material.images.airwall = image;
|
||||
delete(editor.airwallImg);
|
||||
} else image.onload = function () {
|
||||
dc.drawImage(image, nowx, 32);
|
||||
core.material.images.airwall = image;
|
||||
delete(editor.airwallImg);
|
||||
editor.updateMap();
|
||||
}
|
||||
})(editor.airwallImg,dc,nowx);
|
||||
dc.drawImage(images[img], nowx, 32*2);
|
||||
nowx += images[img].width;
|
||||
continue;
|
||||
|
||||
@ -451,6 +451,8 @@ if (location.protocol.indexOf("http")!=0) {
|
||||
|
||||
var useCompress = main.useCompress;
|
||||
main.useCompress = false;
|
||||
editor.airwallImg = new Image();
|
||||
editor.airwallImg.src = './project/images/airwall.png';
|
||||
main.init('editor', function () {
|
||||
editor.init(function () {
|
||||
editor.useCompress = useCompress;
|
||||
|
||||
@ -435,6 +435,8 @@ if (location.protocol.indexOf("http")!=0) {
|
||||
<script>
|
||||
var useCompress = main.useCompress;
|
||||
main.useCompress = false;
|
||||
editor.airwallImg = new Image();
|
||||
editor.airwallImg.src = './project/images/airwall.png';
|
||||
main.init('editor', function () {
|
||||
editor.init(function () {
|
||||
editor.useCompress = useCompress;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user