diff --git a/Zframework/bg.lua b/Zframework/bg.lua index 63af4324..4daf4e6d 100644 --- a/Zframework/bg.lua +++ b/Zframework/bg.lua @@ -1,10 +1,16 @@ -local BGlist={} +local BGlist={ + none={ + draw=function() + love.graphics.clear(.15,.15,.15) + end + } +} local BG={ - cur="", + cur="none", init=nil, resize=nil, update=NULL, - draw=NULL, + draw=BGlist.none.draw, event=nil, discard=NULL, } @@ -17,8 +23,8 @@ function BG.send(...) BG.event(...) end end -function BG.set(background,force) - if background==BG.cur or not(SETTING.bg or force)then return end +function BG.set(background) + if background==BG.cur or not SETTING.bg then return end BG.discard() background=BGlist[background] if not background then diff --git a/Zframework/init.lua b/Zframework/init.lua index 124f6c14..93965863 100644 --- a/Zframework/init.lua +++ b/Zframework/init.lua @@ -477,7 +477,6 @@ function love.run() else SCN.init("load") end - BG.set("none",true) return function() local _ diff --git a/parts/backgrounds/none.lua b/parts/backgrounds/none.lua deleted file mode 100644 index c2f8a071..00000000 --- a/parts/backgrounds/none.lua +++ /dev/null @@ -1,6 +0,0 @@ -local gc=love.graphics -local back={} -function back.draw() - gc.clear(.15,.15,.15) -end -return back \ No newline at end of file