Set a fixed height for piece previews

This commit is contained in:
Oshisaure 2020-10-06 21:43:48 +01:00
parent 8fef7faa6a
commit fcd8b0f360

View File

@ -341,8 +341,8 @@ end
function GameMode:drawNextQueue(ruleset) function GameMode:drawNextQueue(ruleset)
function drawPiece(piece, skin, offsets, pos_x, pos_y) function drawPiece(piece, skin, offsets, pos_x, pos_y)
for index, offset in pairs(offsets) do for index, offset in pairs(offsets) do
local x = ruleset.spawn_positions[piece].x + offset.x local x = offset.x + ruleset.spawn_positions[piece].x
local y = ruleset.spawn_positions[piece].y + offset.y local y = offset.y + 4.7
love.graphics.draw(blocks[skin][piece], pos_x+x*16, pos_y+y*16) love.graphics.draw(blocks[skin][piece], pos_x+x*16, pos_y+y*16)
end end
end end