expand / fold materials
This commit is contained in:
parent
bcb3bfc8fd
commit
5cef1fe4a2
@ -280,7 +280,7 @@ editor.prototype.drawInitData = function (icons) {
|
||||
editor.widthsX = {};
|
||||
editor.folded = core.getLocalStorage('folded', false);
|
||||
// editor.folded = true;
|
||||
editor.foldPerCol = 30;
|
||||
editor.foldPerCol = 50;
|
||||
// var imgNames = Object.keys(images); //还是固定顺序吧;
|
||||
var imgNames = ["terrains", "animates", "enemys", "enemy48", "items", "npcs", "npc48", "autotile"];
|
||||
|
||||
@ -465,7 +465,7 @@ editor.prototype.setSelectBoxFromInfo=function(thisevent){
|
||||
pos.y=thisevent.y;
|
||||
if(thisevent.x)pos.x+=thisevent.x;
|
||||
ysize = thisevent.images.endsWith('48') ? 48 : 32;
|
||||
if (editor.folded) {
|
||||
if (editor.folded && core.tilesets.indexOf(thisevent.images)==-1) {
|
||||
pos.x += Math.floor(pos.y / editor.foldPerCol);
|
||||
pos.y %= editor.foldPerCol;
|
||||
}
|
||||
|
||||
@ -492,7 +492,7 @@ editor.constructor.prototype.listen=function () {
|
||||
}
|
||||
else {
|
||||
var height = editor.widthsX[spriter][3], col = height / ysize;
|
||||
if (editor.folded) {
|
||||
if (editor.folded && core.tilesets.indexOf(pos.images)==-1) {
|
||||
col = (pos.x == editor.widthsX[spriter][2] - 1) ? ((col - 1) % editor.foldPerCol + 1) : editor.foldPerCol;
|
||||
}
|
||||
if (spriter == 'terrains' && pos.x == editor.widthsX[spriter][1]) col += 2;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user