越南语变音字母简化函数改为全unicode版本
限制自定义菜单背景选择范围 微调自定义背景设置ui 整理代码
This commit is contained in:
@@ -115,7 +115,7 @@ do-- function applySettings()
|
||||
light={.2,.8},
|
||||
color={-.2,1.2},
|
||||
}
|
||||
function applySettings(arg)
|
||||
function applySettings(reason)
|
||||
-- Apply language
|
||||
text=LANG.get(SETTING.locale)
|
||||
WIDGET.setLang(text.WidgetText)
|
||||
@@ -157,34 +157,33 @@ do-- function applySettings()
|
||||
SHADER.fieldSatur:send('k',m[2])
|
||||
|
||||
-- Apply BG
|
||||
if not (arg and arg=='fullscreen') then
|
||||
if SETTING.bg=='on' then
|
||||
BG.unlock()
|
||||
BG.setDefault(SETTING.defaultBG)
|
||||
BG.set()
|
||||
if SETTING.lockBG then BG.lock() end
|
||||
elseif SETTING.bg=='off' then
|
||||
if reason=='fullscreen' then return end
|
||||
if SETTING.bg=='on' then
|
||||
BG.unlock()
|
||||
BG.setDefault(SETTING.defaultBG)
|
||||
BG.set()
|
||||
if SETTING.lockBG then BG.lock() end
|
||||
elseif SETTING.bg=='off' then
|
||||
BG.unlock()
|
||||
BG.set('fixColor',SETTING.bgAlpha,SETTING.bgAlpha,SETTING.bgAlpha)
|
||||
BG.lock()
|
||||
elseif SETTING.bg=='custom' then
|
||||
if love.filesystem.getInfo('conf/customBG') then
|
||||
local res,image=pcall(GC.newImage,love.filesystem.newFile('conf/customBG'))
|
||||
if res then
|
||||
BG.unlock()
|
||||
GC.setDefaultFilter('linear','linear')
|
||||
BG.set('custom',SETTING.bgAlpha,image)
|
||||
GC.setDefaultFilter('nearest','nearest')
|
||||
BG.lock()
|
||||
else
|
||||
MES.new('error',text.customBGloadFailed)
|
||||
end
|
||||
else-- Switch off when custom BG not found
|
||||
SETTING.bg='off'
|
||||
BG.unlock()
|
||||
BG.set('fixColor',SETTING.bgAlpha,SETTING.bgAlpha,SETTING.bgAlpha)
|
||||
BG.lock()
|
||||
elseif SETTING.bg=='custom' then
|
||||
if love.filesystem.getInfo('conf/customBG') then
|
||||
local res,image=pcall(GC.newImage,love.filesystem.newFile('conf/customBG'))
|
||||
if res then
|
||||
BG.unlock()
|
||||
GC.setDefaultFilter('linear','linear')
|
||||
BG.set('custom',SETTING.bgAlpha,image)
|
||||
GC.setDefaultFilter('nearest','nearest')
|
||||
BG.lock()
|
||||
else
|
||||
MES.new('error',text.customBGloadFailed)
|
||||
end
|
||||
else-- Switch off when custom BG not found
|
||||
SETTING.bg='off'
|
||||
BG.unlock()
|
||||
BG.set('fixColor',SETTING.bgAlpha,SETTING.bgAlpha,SETTING.bgAlpha)
|
||||
BG.lock()
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -196,7 +195,7 @@ local function getSmallNum(num)
|
||||
local str=tostring(num)
|
||||
local out=""
|
||||
for i=1,#str do
|
||||
out=out..smallDigits[tonumber(string.sub(str,i,i))]
|
||||
out=out..smallDigits[tonumber(str:sub(i,i))]
|
||||
end
|
||||
return out
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user