I thought of a good way to handle UI masking

EDIT: I’m requesting UI masking, though I came up with this so I thought i’d share it. I just wanted to help.

Essentially what I came up with is a system similar to unions. There would be two different classes for UI masking, one for what should be shown and one for what would be removed. The idea is you would create different shapes by using these two different classes and putting some inside of others for different effects.

You would be able to choose if the mask is a box or an image and if it’s an image it gets all the properties of Image UI elements relating to the image such as slicing.

It would end up being something like this (sorry for the crappy image, i’m not the best at photo editing AND I rushed it)

The red part is the negative class and it’s parent is the dark blue positive one.

Hierarchy:
Image/Frame
-Blue 1
-Blue 2
—Red (Negative)

The different elements are numbered in the top half.

I hope this makes sense, I don’t really know how else to explain it.

6 Likes

I like the idea, but I don’t know if roblox would implement something like this. I do really wish we had more ui shapes though. I hate having to upload images to make shapes. :octopus:

1 Like

Masking is a feature we want to add eventually, but currently do not have resources allocated to it. We don’t need help coming up with an API.

10 Likes

As Tiffblocks said, you probably should stick to the feature request, not how to solve it. ROBLOX does that internally and probably will ignore your current suggestion because it’ll be one of the many solutions they come up with to solve the issue (if they choose to create this feature), where it may or may not be the best solution to use.

:slight_smile: I’d recommend an edit to make this more clear