Slate blurred border shadow
I want to create UI's with dynamic blurred shadows, like those seen in CSS's box-shadow feature. The logical thing to do would be bake it into an image. But I really do want it done procedurally so I can animate it.
I can't seem to find out how to do this, so I am left with the assumption that it's not a feature of slate (I'd love it if you corrected me here)
I haven't got the first clue of how to implement such a rendering feature to slate though. So if it is really not a feature and I have to implement it myself, can someone point me in the right direction? Where do I start? The slate API docs seem rather lacking at the moment so it's hard to tell what to do.
I think the best way to do it is going to be to have a image border with the shadow and animating its content padding.
First thing (most obvious) to try out is to use
then the definition of Padding parameter would look like this:
It's all in the
Now all you need is function to set/animate padding values and you should get what you need. If not - you can always try to override either
It's actually interesting how it can turn out and I think I'll implement it myself ; )
Hope this helps.
answered May 24 '15 at 10:33 AM
Since SBorder wasnt quite enough to get the desired result I made use of SOverlay widget and ended up with something like this: (mouse cursor imitates 'light source' so the shadow moves around)
The shadow itself is not blurred but it's just the matter of used brush ; )
Heres the code if anyone needs it (note that I'm using Editor style in this example so you will have to add needed dependencies to your project for it to compile. Also, remove Tick function from SShadowBorder class to remove sample shadow updates)
answered May 25 '15 at 01:45 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here