gui = create_gui()
gui:attach_button{
label="Press Me",
x=0,y=0,w=64,h=64,
click=function(self)self.hidden=true end
}
function _update()
gui:update_all()
end
function _draw()
gui:draw_all()
end |
Hiding a button throws an error at line 959 due to el being null. The if statement checks for dragging_el but does not check for el, which has become null due to become hidden on line 833.
I propose a check for el check on line 953 so an error is not thrown.
I understand that tap can be used instead and this avoids the issue, but wanted to mention as seems common enough implementation.
1
Thanks @Munro -- this is fixed in 0.1.1f
// that if check was meant to use dragging_el.sx in the first place, not el.sx
[Please log in to post a comment]




