rebuild ui on resize
This commit is contained in:
parent
756bbfdc99
commit
18a69b1ba5
2 changed files with 6 additions and 2 deletions
4
main.lua
4
main.lua
|
@ -155,4 +155,8 @@ function love.keypressed(key)
|
|||
::continue::
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function love.resize()
|
||||
createUI()
|
||||
end
|
|
@ -99,7 +99,7 @@ function self.render()
|
|||
-- polygone
|
||||
-- this isnt done with a polygon because else itd waste a Bunch of ram and i kinda, dont want to do that?
|
||||
love.graphics.setColor(1, 1, 1, 1)
|
||||
love.graphics.setScissor(x + margin, y + margin, w - (margin * 2), h - (margin * 2))
|
||||
love.graphics.setScissor(x + margin, y + margin, math.abs(w - (margin * 2)), math.abs(h - (margin * 2)))
|
||||
local last = (((graph[1] or 0) - 0.5) * zoome) + 0.5
|
||||
for gx = 1, quality - 1 do
|
||||
local a = gx/quality
|
||||
|
@ -129,7 +129,7 @@ function self.render()
|
|||
|
||||
-- preview
|
||||
if not screenshot then
|
||||
love.graphics.setScissor(x - margin, 0, w + margin * 2, sh)
|
||||
love.graphics.setScissor(x - margin, 0, math.abs(w + margin * 2), sh)
|
||||
love.graphics.setColor(0.16, 0.16, 0.17, 1)
|
||||
love.graphics.line(x + margin, y + h + padding * 2 + csize/2, x + w - margin, y + h + padding * 2 + csize/2)
|
||||
love.graphics.setColor(0.3, 0.3, 0.31, 1)
|
||||
|
|
Loading…
Reference in a new issue