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