微调背景模块,自定义模式设置背景的时候访问不到特殊背景了

This commit is contained in:
MrZ626
2021-11-29 04:22:08 +08:00
parent e0360cc7eb
commit a350ff3182
3 changed files with 8 additions and 2 deletions

View File

@@ -24,6 +24,9 @@ end
function BG.getList()
return BGlist
end
function BG.remList(name)
table.remove(BGlist,TABLE.find(BGlist,name))
end
function BG.send(...)
if BG.event then
BG.event(...)

View File

@@ -380,6 +380,7 @@ for _,v in next,fs.getDirectoryItems('parts/backgrounds')do
BG.add(name,require('parts.backgrounds.'..name))
end
end
BG.remList('none')BG.remList('gray')BG.remList('custom')
--Load scene files from SOURCE ONLY
for _,v in next,fs.getDirectoryItems('parts/scenes')do
if isSafeFile('parts/scenes/'..v)then

View File

@@ -18,8 +18,10 @@ function back.resize()
end
function back.draw()
gc_clear(.1,.1,.1)
gc_setColor(1,1,1,alpha)
mDraw(image,mx,my,nil,k)
if image then
gc_setColor(1,1,1,alpha)
mDraw(image,mx,my,nil,k)
end
end
function back.event(a,img)
if a then alpha=a end