微调背景模块,自定义模式设置背景的时候访问不到特殊背景了
This commit is contained in:
@@ -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(...)
|
||||
|
||||
1
main.lua
1
main.lua
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user