gray背景改名fixColor,允许自定义颜色
This commit is contained in:
@@ -1,11 +1,11 @@
|
|||||||
--Customizable grey background
|
--Customizable grey background
|
||||||
local gc=love.graphics
|
local gc=love.graphics
|
||||||
local back={}
|
local back={}
|
||||||
local brightness=.26
|
local r,g,b=.26,.26,.26
|
||||||
function back.draw()
|
function back.draw()
|
||||||
gc.clear(brightness,brightness,brightness)
|
gc.clear(r,g,b)
|
||||||
end
|
end
|
||||||
function back.event(b)
|
function back.event(_r,_g,_b)
|
||||||
brightness=b
|
r,g,b=_r,_g,_b
|
||||||
end
|
end
|
||||||
return back
|
return back
|
||||||
@@ -165,8 +165,8 @@ do--function applySettings()
|
|||||||
BG.set()
|
BG.set()
|
||||||
elseif SETTING.bg=='off'then
|
elseif SETTING.bg=='off'then
|
||||||
BG.unlock()
|
BG.unlock()
|
||||||
BG.set('gray')
|
BG.set('fixColor')
|
||||||
BG.send(SETTING.bgAlpha)
|
BG.send(SETTING.bgAlpha,SETTING.bgAlpha,SETTING.bgAlpha)
|
||||||
BG.lock()
|
BG.lock()
|
||||||
elseif SETTING.bg=='custom'then
|
elseif SETTING.bg=='custom'then
|
||||||
if love.filesystem.getInfo('conf/customBG')then
|
if love.filesystem.getInfo('conf/customBG')then
|
||||||
@@ -184,8 +184,8 @@ do--function applySettings()
|
|||||||
else--Switch off when custom BG not found
|
else--Switch off when custom BG not found
|
||||||
SETTING.bg='off'
|
SETTING.bg='off'
|
||||||
BG.unlock()
|
BG.unlock()
|
||||||
BG.set('gray')
|
BG.set('fixColor')
|
||||||
BG.send(SETTING.bgAlpha)
|
BG.send(SETTING.bgAlpha,SETTING.bgAlpha,SETTING.bgAlpha)
|
||||||
BG.lock()
|
BG.lock()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -199,7 +199,8 @@ local scene={}
|
|||||||
|
|
||||||
function scene.sceneInit()
|
function scene.sceneInit()
|
||||||
reset()
|
reset()
|
||||||
BG.set('gray')
|
BG.set('fixColor')
|
||||||
|
BG.send(.26,.26,.26)
|
||||||
BGM.play(bgm)
|
BGM.play(bgm)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -86,6 +86,8 @@ end
|
|||||||
local scene={}
|
local scene={}
|
||||||
|
|
||||||
function scene.sceneInit()
|
function scene.sceneInit()
|
||||||
|
BG.set('fixColor')
|
||||||
|
BG.send(.26,.62,.26)
|
||||||
_newGame()
|
_newGame()
|
||||||
selected=false
|
selected=false
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -12,7 +12,8 @@ function scene.sceneInit()
|
|||||||
lastKey=nil
|
lastKey=nil
|
||||||
speed=0
|
speed=0
|
||||||
keyTime={}for i=1,40 do keyTime[i]=-1e99 end
|
keyTime={}for i=1,40 do keyTime[i]=-1e99 end
|
||||||
BG.set('gray')
|
BG.set('fixColor')
|
||||||
|
BG.send(.26,.26,.26)
|
||||||
BGM.play('push')
|
BGM.play('push')
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user