Place preview

This commit is contained in:
KikooDX 2020-02-21 15:16:35 +01:00
parent b8e5a0699c
commit 750d0e569d
2 changed files with 6 additions and 2 deletions

View File

@ -1,6 +1,8 @@
function love.draw()
love.graphics.push()
love.graphics.scale(scale)
--draw screen
love.graphics.setColor(1, 1, 1, 1)
x = 0
y = 0
for i = 1, SCREEN_LEN, 1 do
@ -18,6 +20,9 @@ function love.draw()
y = y + 16
end
end
--draw preview
love.graphics.setColor(1, 1, 1, 0.5)
love.graphics.draw(tiles[selected_tile], clip_mouse_x, clip_mouse_y)
--gui
love.graphics.pop()
love.graphics.setColor(0.8, 0.8, 0.8, 1)

View File

@ -3,8 +3,7 @@ local img_path = "img/"
tiles = {
love.graphics.newImage(img_path.."ground.png"),
love.graphics.newImage(img_path.."elevator1.png"),
false,
}
tiles_char = { '0', '^', '.' }
tiles_char = { '0', '^' }
selected_tile = 1