mirror of
https://github.com/TangentFoxy/Pop.Box.git
synced 2024-12-15 12:44:20 +00:00
attempts to fix things (un-compiled)
This commit is contained in:
parent
a0b6d03c2b
commit
6586106a6f
@ -4,17 +4,23 @@ import sub, len from string
|
||||
path = sub ..., 1, len(...) - len "/box"
|
||||
element = require "#{path}/element"
|
||||
|
||||
util = sub path, 1, len(path) - len "/elements"
|
||||
import inheritsFromElement from require "#{util}/util"
|
||||
|
||||
class text extends element
|
||||
wrap: (pop) ->
|
||||
return (parent, ...) ->
|
||||
if type(parent) == "string"
|
||||
return pop.create("text", nil, parent, ...)
|
||||
else
|
||||
elseif inheritsFromElement parent
|
||||
return pop.create("text", parent, ...)
|
||||
--else
|
||||
-- error "text wrapper failed", parent
|
||||
|
||||
new: (pop, parent, text="", color={255,255,255,255}) =>
|
||||
print("---===---")
|
||||
print(@, pop, parent, text, color)
|
||||
print(pop.load)
|
||||
print("---===---")
|
||||
|
||||
super pop, parent
|
||||
|
Loading…
Reference in New Issue
Block a user