框架新增1*1空白画布变量PAPER

This commit is contained in:
MrZ626
2021-12-09 17:26:02 +08:00
parent 6600713f4b
commit df089a2f04
3 changed files with 3 additions and 4 deletions

View File

@@ -2,7 +2,6 @@ local IMG={}
function IMG.init(list)
IMG.init=nil
local null=love.graphics.newCanvas(1,1)
setmetatable(IMG,{__index=function(self,name)
if type(list[name])=='table'then
self[name]={}
@@ -13,7 +12,7 @@ function IMG.init(list)
self[name]=love.graphics.newImage(list[name])
else
LOG("No IMG: "..name)
self[name]=null
self[name]=PAPER
end
return self[name]
end})

View File

@@ -1,4 +1,4 @@
NONE={}function NULL()end
NONE={}function NULL()end PAPER=love.graphics.newCanvas(1,1)
EDITING=""
LOADED=false

View File

@@ -116,7 +116,7 @@ MODES= require'parts.modes'
setmetatable(TEXTURE,{__index=function(self,k)
MES.new('warn',"No texture called: "..k)
self[k]=love.graphics.newCanvas(1,1)
self[k]=PAPER
return self[k]
end})