working on extensions/optional parenting

This commit is contained in:
Paul Liverman 2016-04-01 15:48:58 -07:00
parent 25f77d8d16
commit ba6d7e0f7a
2 changed files with 3 additions and 3 deletions

View File

@ -23,6 +23,7 @@ function love.load()
--]]
--c:move(100)
pop.box({255, 0, 0, 255}):position(50, 600) -- testing streamlined_get_set extension & optional parents
--[[
w2 = pop.window(nil, "Window")

View File

@ -79,11 +79,10 @@ instanceOfElement = (object) ->
pop.create = (element, parent=pop.screen, ...) ->
if instanceOfElement parent
element = pop.elements[element](parent, ...)
insert parent.child, element
else
element = pop.elements[element](pop.screen, parent, ...)
if parent
insert parent.child, element
insert pop.screen.child, element
return element