Merge pull request #67 from MillaBasset/features/backgrounds

Slight revamp on BG image handling
This commit is contained in:
Ishaan Bhardwaj
2023-07-01 22:22:50 -04:00
committed by GitHub
2 changed files with 10 additions and 21 deletions

View File

@@ -979,9 +979,11 @@ function GameMode:drawSectionTimesWithSplits(current_section, section_limit)
end
function GameMode:drawBackground()
local id = self:getBackground()
if type(id) == "number" then id = clamp(id, 0, #backgrounds) end
love.graphics.setColor(1, 1, 1, 1)
love.graphics.draw(
backgrounds[self:getBackground()],
backgrounds[id],
0, 0, 0,
0.5, 0.5
)