cmd新增setbg命令
This commit is contained in:
@@ -193,6 +193,14 @@ do--commands.help(arg)
|
||||
"Usage: stopbgm"
|
||||
},
|
||||
},
|
||||
setbg={
|
||||
description="Set background.",
|
||||
details={
|
||||
"Set background.",
|
||||
"",
|
||||
"Usage: setbg <classic|xmas|sprfes|zday>",
|
||||
},
|
||||
},
|
||||
theme={
|
||||
description="Load a theme.",
|
||||
details={
|
||||
@@ -223,6 +231,7 @@ do--commands.help(arg)
|
||||
"play",
|
||||
"playbgm",
|
||||
"stopbgm",
|
||||
"setbg",
|
||||
"theme",
|
||||
}
|
||||
local pageSize=10
|
||||
@@ -436,6 +445,21 @@ end
|
||||
function commands.stopbgm()
|
||||
BGM.stop()
|
||||
end
|
||||
function commands.setbg(name)
|
||||
if name~=""then
|
||||
if name~=BG.cur then
|
||||
local t=BG.cur
|
||||
BG.set(name)
|
||||
if t==BG.cur then
|
||||
log("No background called "..name)
|
||||
else
|
||||
log("Background set to: "..name)
|
||||
end
|
||||
end
|
||||
else
|
||||
log{C.water,"Usage: setbg [bgName]"}
|
||||
end
|
||||
end
|
||||
function commands.theme(name)
|
||||
if name=="classic"then
|
||||
THEME=false
|
||||
|
||||
Reference in New Issue
Block a user