mirror of
https://github.com/linux-man/LoveFrames.git
synced 2024-11-26 05:14:21 +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)
|
function newobject:SetIcon(icon)
|
||||||
|
|
||||||
|
if type(icon) == "string" then
|
||||||
|
self.icon = love.graphics.newImage(icon)
|
||||||
|
else
|
||||||
self.icon = icon
|
self.icon = icon
|
||||||
|
end
|
||||||
|
|
||||||
return self
|
return self
|
||||||
|
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user