mirror of
https://github.com/linux-man/LoveFrames.git
synced 2024-11-18 16:04:22 +00:00
Check type of icon argument in treenode:SetIcon
This commit is contained in:
parent
73b8c03b74
commit
b35ce451b4
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user