简化代码

This commit is contained in:
MrZ626
2020-12-28 22:13:19 +08:00
parent cbd013d2f5
commit 27baab2f57
3 changed files with 6 additions and 9 deletions

View File

@@ -7,7 +7,7 @@ local BGlist={
}
local BG={
cur="none",
defaultBG="none",
default="none",
init=false,
resize=false,
update=NULL,
@@ -24,12 +24,12 @@ function BG.send(...)
BG.event(...)
end
end
function BG.setDefaultBG(bg)
defaultBG=bg
function BG.setDefault(bg)
BG.default=bg
end
function BG.set(background)
if not background then
background=defaultBG
background=BG.default
end
if background==BG.cur or not SETTING.bg then return end
BG.discard()