Created
April 5, 2019 13:45
-
-
Save chrisdugne/73962c558743f613d5232b8128d3e0a2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local cardW = W * 0.9 | |
local cardH = 250 | |
local SR = 3 -- shadow radius | |
local SA = 0.4 -- shadow alpha | |
local card = display.newGroup() | |
options.parent:insert(card) | |
card.x = options.x | |
card.y = options.y | |
----------------------------- | |
local shadeGroup = display.newSnapshot(card, cardW + SR * 2, cardH + SR * 2) | |
shadeGroup.x, shadeGroup.y = SR * 1.2, SR * 1.2 | |
shadeGroup.fill.effect = 'filter.blurGaussian' | |
shadeGroup.fill.effect.horizontal.blurSize = SR | |
shadeGroup.fill.effect.vertical.blurSize = SR | |
local shadow = | |
display.newRoundedRect(shadeGroup.group, 0, 0, cardW + SR, cardH + SR, 7) | |
shadow:setFillColor(0, 0, 0, SA) | |
local panel = display.newRoundedRect(card, 0, 0, cardW, cardH, 7) | |
panel:setFillColor(1, 1, 1, 1) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment