Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function profiles:draw()
- love.graphics.setFont(Fonts.title)
- love.graphics.printf('Select a Profile or create a new one!',0,100,screen.width,'center')
- local font = Fonts.large
- love.graphics.setFont(font)
- local size = 150
- local left = screen.width/2 - size/2
- local top = screen.height/2
- love.graphics.setColor(255,255,255,50 + 50*(math.sin(glowfx*3) + 1))
- love.graphics.rectangle('fill',left,top,size,size)
- love.graphics.setColor(255,255,255)
- love.graphics.rectangle('line',left,top,size,size)
- for i=1, #list+1 do
- local x = left + (i-1)*size - (selection-1)*size
- local y = top
- if i <= #list then
- local v = list[i]
- local height = font:getHeight(v.name)
- love.graphics.setColor(0,0,0,100)
- love.graphics.printf(v.name, x+2, y + size - height + 2, size, 'center')
- love.graphics.setColor(255,255,255)
- love.graphics.printf(v.name, x, y + size - height, size, 'center')
- love.graphics.setColor(HSL(v.hue,200,125))
- love.graphics.draw(img.player, x + size/2 - 25, y + size/2 - 25, 0, 2, 2)
- else
- local text = 'New'
- local height = font:getHeight(text)
- love.graphics.setColor(0,0,0,100)
- love.graphics.printf(text, x+2, y + size - height + 2, size, 'center')
- love.graphics.setColor(255,255,255)
- love.graphics.printf(text, x, y + size - height, size, 'center')
- love.graphics.draw(img.add, x + size/2 - 25, y + size/2 - 25, 0, 2, 2)
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment