mirror of
https://github.com/TangentFoxy/Pop.Box.git
synced 2024-12-15 12:44:20 +00:00
working on extensions/optional parenting
This commit is contained in:
parent
25f77d8d16
commit
ba6d7e0f7a
@ -23,6 +23,7 @@ function love.load()
|
|||||||
--]]
|
--]]
|
||||||
|
|
||||||
--c:move(100)
|
--c:move(100)
|
||||||
|
pop.box({255, 0, 0, 255}):position(50, 600) -- testing streamlined_get_set extension & optional parents
|
||||||
|
|
||||||
--[[
|
--[[
|
||||||
w2 = pop.window(nil, "Window")
|
w2 = pop.window(nil, "Window")
|
||||||
|
@ -79,11 +79,10 @@ instanceOfElement = (object) ->
|
|||||||
pop.create = (element, parent=pop.screen, ...) ->
|
pop.create = (element, parent=pop.screen, ...) ->
|
||||||
if instanceOfElement parent
|
if instanceOfElement parent
|
||||||
element = pop.elements[element](parent, ...)
|
element = pop.elements[element](parent, ...)
|
||||||
|
insert parent.child, element
|
||||||
else
|
else
|
||||||
element = pop.elements[element](pop.screen, parent, ...)
|
element = pop.elements[element](pop.screen, parent, ...)
|
||||||
|
insert pop.screen.child, element
|
||||||
if parent
|
|
||||||
insert parent.child, element
|
|
||||||
|
|
||||||
return element
|
return element
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user