diff Libs/DF/picture.lua @ 29:5da06cb420d4

- framework update.
author Tercioo
date Sat, 02 Jan 2016 13:33:05 -0200
parents dc1c77254f80
children 7944c081e5b4
line wrap: on
line diff
--- a/Libs/DF/picture.lua	Fri Dec 18 15:15:50 2015 -0200
+++ b/Libs/DF/picture.lua	Sat Jan 02 13:33:05 2016 -0200
@@ -213,7 +213,7 @@
 function DF:NewImage (parent, texture, w, h, layer, coords, member, name)
 
 	if (not parent) then
-		return nil
+		return error ("Details! FrameWork: parent not found.", 2)
 	end
 	
 	if (not name) then
@@ -222,7 +222,8 @@
 	end
 	
 	if (name:find ("$parent")) then
-		name = name:gsub ("$parent", parent:GetName())
+		local parentName = DF.GetParentName (parent)
+		name = name:gsub ("$parent", parentName)
 	end
 	
 	local ImageObject = {type = "image", dframework = true}