gui/GuiManager/Image-Animation/newImageLabel.int
Ryan Ward 76fd457833 Updated to 9.0.0
Love2D 1.11 Support is here! :D
2018-06-09 14:54:54 -04:00

18 lines
533 B
Plaintext

function gui:newImageLabel(i,name, x, y, w, h, sx ,sy ,sw ,sh)
x,y,w,h,sx,sy,sw,sh=filter(name, x, y, w, h, sx ,sy ,sw ,sh)
local c=self:newBase("ImageLabel",name, x, y, w, h, sx ,sy ,sw ,sh)
if type(i)=="string" or type(i):find("ImageData") then
c.Image=love.graphics.newImage(i)
else
c.Image=i
end
c.Visibility=0
c.ImageVisibility=1
c.rotation=0
if c.Image then
c.ImageHeigth=c.Image:getHeight()
c.ImageWidth=c.Image:getWidth()
c.Quad=love.graphics.newQuad(0,0,w,h,c.ImageWidth,c.ImageHeigth)
end
return c
end