- [FIX] El layer frontal no se veïa (encara que no se si al final s'usarà)
This commit is contained in:
@@ -19,7 +19,7 @@ editor={
|
||||
menu.show({ {"NEW MAP", editor.new},
|
||||
{"LOAD MAP", function() textbox.show("FILENAME TO LOAD:",editor.load, mapa.name) end},
|
||||
{"SAVE MAP", function() if mapa.name~=nil then editor.save(mapa.name) else textbox.show("FILENAME TO SAVE:",editor.save, mapa.name) end end},
|
||||
{mapa.front_layer and "DISABLE FRONT LAYER" or "ENABLE FRONT LAYER", editor.toggle_front_layer},
|
||||
{editor.editing_front_layer and "DISABLE FRONT LAYER" or "ENABLE FRONT LAYER", editor.toggle_front_layer},
|
||||
{"RESIZE MAP", editor.resize},
|
||||
{"RELOAD TEXTURES", editor.reload_textures},
|
||||
{"EXIT", main_init},
|
||||
@@ -40,17 +40,23 @@ editor={
|
||||
end,
|
||||
|
||||
toggle_front_layer=function()
|
||||
if not mapa.front_layer then
|
||||
mapa.front_layer=newsurf(mapa.w,mapa.h)
|
||||
editor.editing_front_layer=true
|
||||
setmap(mapa.front_layer)
|
||||
for y=0,mapa.h-1 do
|
||||
for x=0,mapa.w-1 do
|
||||
mset(x,y,0)
|
||||
end
|
||||
end
|
||||
if editor.editing_front_layer then
|
||||
setmap(mapa.surface)
|
||||
editor.editing_front_layer=false;
|
||||
else
|
||||
mapa.front_layer=nil
|
||||
if not mapa.front_layer then
|
||||
mapa.front_layer=newsurf(mapa.w,mapa.h)
|
||||
editor.editing_front_layer=true
|
||||
setmap(mapa.front_layer)
|
||||
for y=0,mapa.h-1 do
|
||||
for x=0,mapa.w-1 do
|
||||
mset(x,y,0)
|
||||
end
|
||||
end
|
||||
else
|
||||
editor.editing_front_layer=true
|
||||
setmap(mapa.front_layer)
|
||||
end
|
||||
end
|
||||
editor.paused=false
|
||||
end,
|
||||
|
||||
Reference in New Issue
Block a user