I'm still figuring out how to make a proper slide menu. Currently I'm trying to find the best way to only show a small area from all the objects of the slide menu.
The rectangle is the visible area of the slide menu. Inside this rectangle the overlapping (blue) parts of the circles should be visible. The circles are the individual menu objects.
Every (red) part of the circles who are not inside this rectangle should be hidden.
I tried to achieve this by just using a sprite with the same color as the background which is placed on top and bottom of the rectangle area. So this sprite just overlaps the parts of the circles that should be hidden with the backgrounds color. The problem is that I do not know how I can set this "HideArea"-Objects color the same as the backgrounds color. How can I check the background color in runtime?
Or is there a more elegant way to achieve this? Like make a sprite invisible and just make the rectangle overlapping part of it visible?
Note: There are other objects outside the rectangle that must still be visible.
Thanks in advance! :)