Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
Showing modal mask on Popup's — Gideros Forum

Showing modal mask on Popup's

emreemre Member
edited September 2013 in General questions
Hi,
I am using Popup class (from game template).
I need to show modal mask behind the pop-up layer.
I try following codes but not working:
function Popup:drawMask()
	local texture = Texture.new("images/background/b1.png", true, {wrap = Texture.REPEAT})
	local shape = Shape.new()
	shape:setFillStyle(Shape.TEXTURE, texture)  
	shape:beginPath(Shape.NON_ZERO)
	shape:moveTo(-500,-500)
	shape:lineTo(application:getDeviceWidth()+500, -500)
	shape:lineTo(application:getDeviceWidth()+500, application:getDeviceHeight()+500)
	shape:lineTo(-500, application:getDeviceHeight()+500)
	shape:lineTo(-500,-500)
	shape:endPath()
	self:addChild(shape)		
end
 
function Popup:draw()
	--shape
	self:clear()
	if self.conf.showMask then
		self:drawMask()
	end
...
And mask show be displayed without animation.
Thanks for your help.

Comments

Sign In or Register to comment.