Fix Bg/Fg Bug & Add opacity
This commit is contained in:
parent
8c42c0956a
commit
bede2fe682
@ -1079,19 +1079,33 @@ editor.prototype.listen = function () {
|
||||
editor.brushMod=brushMod3.value;
|
||||
}
|
||||
|
||||
var bgc = document.getElementById('bg'), fgc = document.getElementById('fg'),
|
||||
evc = document.getElementById('event'), ev2c = document.getElementById('event2');
|
||||
|
||||
var layerMod=document.getElementById('layerMod');
|
||||
layerMod.onchange=function(){
|
||||
editor.layerMod=layerMod.value;
|
||||
[bgc,fgc,evc,ev2c].forEach(function (x) {
|
||||
x.style.opacity = 1;
|
||||
});
|
||||
}
|
||||
|
||||
var layerMod2=document.getElementById('layerMod2');
|
||||
if(layerMod2)layerMod2.onchange=function(){
|
||||
editor.layerMod=layerMod2.value;
|
||||
[fgc,evc,ev2c].forEach(function (x) {
|
||||
x.style.opacity = 0.3;
|
||||
});
|
||||
bgc.style.opacity = 1;
|
||||
}
|
||||
|
||||
var layerMod3=document.getElementById('layerMod3');
|
||||
if(layerMod3)layerMod3.onchange=function(){
|
||||
editor.layerMod=layerMod3.value;
|
||||
[bgc,evc,ev2c].forEach(function (x) {
|
||||
x.style.opacity = 0.3;
|
||||
});
|
||||
fgc.style.opacity = 1;
|
||||
}
|
||||
|
||||
var viewportButtons=document.getElementById('viewportButtons');
|
||||
|
||||
@ -386,7 +386,7 @@ maps.prototype.getBgFgMapArray = function (floorId, name) {
|
||||
var width = core.floors[floorId].width || 13;
|
||||
var height = core.floors[floorId].height || 13;
|
||||
|
||||
if (core.isset(core.status[name+"maps"][floorId]))
|
||||
if (main.mode!='editor' && core.isset(core.status[name+"maps"][floorId]))
|
||||
return core.status[name+"maps"][floorId];
|
||||
|
||||
var arr = core.clone(core.floors[floorId][name+"map"] || []);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user