修复一些背景相关问题,框架跟进
This commit is contained in:
Submodule Zframework updated: a91c3d67f2...559a8a46a7
2
main.lua
2
main.lua
@@ -180,7 +180,7 @@ Z.setOnFnKeys({
|
||||
end
|
||||
end
|
||||
end,
|
||||
function()print(WIDGET.getSelected()or"no widget selected")end,
|
||||
function()print(BG.locked)end,
|
||||
function()for k,v in next,_G do print(k,v)end end,
|
||||
function()if love['_openConsole']then love['_openConsole']()end end,
|
||||
})
|
||||
|
||||
@@ -165,17 +165,15 @@ do--function applySettings()
|
||||
BG.set()
|
||||
elseif SETTING.bg=='off'then
|
||||
BG.unlock()
|
||||
BG.set('fixColor')
|
||||
BG.send(SETTING.bgAlpha,SETTING.bgAlpha,SETTING.bgAlpha)
|
||||
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()
|
||||
BG.set('custom')
|
||||
gc.setDefaultFilter('linear','linear')
|
||||
BG.send(SETTING.bgAlpha,image)
|
||||
BG.set('custom',SETTING.bgAlpha,image)
|
||||
gc.setDefaultFilter('nearest','nearest')
|
||||
BG.lock()
|
||||
else
|
||||
@@ -184,8 +182,7 @@ do--function applySettings()
|
||||
else--Switch off when custom BG not found
|
||||
SETTING.bg='off'
|
||||
BG.unlock()
|
||||
BG.set('fixColor')
|
||||
BG.send(SETTING.bgAlpha,SETTING.bgAlpha,SETTING.bgAlpha)
|
||||
BG.set('fixColor',SETTING.bgAlpha,SETTING.bgAlpha,SETTING.bgAlpha)
|
||||
BG.lock()
|
||||
end
|
||||
end
|
||||
|
||||
@@ -199,8 +199,7 @@ local scene={}
|
||||
|
||||
function scene.sceneInit()
|
||||
reset()
|
||||
BG.set('fixColor')
|
||||
BG.send(.26,.26,.26)
|
||||
BG.set('fixColor',.26,.26,.26)
|
||||
BGM.play(bgm)
|
||||
end
|
||||
|
||||
|
||||
@@ -106,8 +106,7 @@ end
|
||||
local scene={}
|
||||
|
||||
function scene.sceneInit()
|
||||
BG.set('fixColor')
|
||||
BG.send(.26,.62,.26)
|
||||
BG.set('fixColor',.26,.62,.26)
|
||||
_newGame()
|
||||
selected=false
|
||||
end
|
||||
|
||||
@@ -12,8 +12,7 @@ function scene.sceneInit()
|
||||
lastKey=nil
|
||||
speed=0
|
||||
keyTime={}for i=1,40 do keyTime[i]=-1e99 end
|
||||
BG.set('fixColor')
|
||||
BG.send(.26,.26,.26)
|
||||
BG.set('fixColor',.26,.26,.26)
|
||||
BGM.play('push')
|
||||
end
|
||||
|
||||
|
||||
@@ -97,7 +97,14 @@ scene.widgetList={
|
||||
},
|
||||
WIDGET.newSlider{name='bgAlpha', x=1020,y=1430,w=200,
|
||||
axis={0,.8},disp=SETval('bgAlpha'),
|
||||
code=function(v)SETTING.bgAlpha=v BG.send(v,v,v)end,
|
||||
code=function(v)
|
||||
SETTING.bgAlpha=v
|
||||
if BG.cur=='fixColor' then
|
||||
BG.send(v,v,v)
|
||||
else
|
||||
BG.send(v)
|
||||
end
|
||||
end,
|
||||
hideF=function()return SETTING.bg=='on'end
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user