push() appears to be broken
Closed this issue · 2 comments
aidalgol commented
Any widget calls within a push/pop are not rendered. In the below example, the text "Ho, hum..." appears if the push()
and pop()
calls are commented out.
suit = require "SUIT"
local show_message = false
function love.update(dt)
suit.layout.reset(20, 20)
if suit.Button("Hello, World!", suit.layout.row(300, 30)).hit then
show_message = true
end
suit.layout.push(20, 20)
suit.Label("Ho, hum...", suit.layout.row())
suit.layout.pop()
if show_message then
suit.Label("How are you today?", suit.layout.col(200, 30))
end
end
function love.draw()
suit.core.draw()
end
aidalgol commented
I figured out why the text is not displayed literally within a minute of posting it: the call to row()
after the push()
is not passed any dimensions.
vrld commented
SUIT should probably throw an error in this case