diff --git a/objects/internal/treenode.lua b/objects/internal/treenode.lua index 0de276b..4d79e45 100644 --- a/objects/internal/treenode.lua +++ b/objects/internal/treenode.lua @@ -179,7 +179,12 @@ end function newobject:SetIcon(icon) - self.icon = icon + if type(icon) == "string" then + self.icon = love.graphics.newImage(icon) + else + self.icon = icon + end + return self end