gray背景改名fixColor,允许自定义颜色

This commit is contained in:
MrZ_26
2022-01-22 17:16:48 +08:00
parent ea0448af5a
commit a66bb9013a
5 changed files with 14 additions and 10 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -86,6 +86,8 @@ end
local scene={}
function scene.sceneInit()
BG.set('fixColor')
BG.send(.26,.62,.26)
_newGame()
selected=false
end

View File

@@ -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