自定义背景拖入无法识别的格式时会提示

This commit is contained in:
MrZ626
2021-11-28 05:20:18 +08:00
parent f8b9f30fd6
commit 73145b4e5e
10 changed files with 31 additions and 14 deletions

View File

@@ -8,9 +8,13 @@ end
function scene.fileDropped(file)
love.filesystem.write('conf/customBG',file:read('data'))
SETTING.bg='custom'
applyBG()
if pcall(gc.newImage,file)then
love.filesystem.write('conf/customBG',file:read('data'))
SETTING.bg='custom'
applyBG()
else
MES.new('error',text.customBGloadFailed)
end
end
local fakeBlock={{true}}