UICorner Individual Corners

This is a great idea but I don’t like the idea that you can’t change the Radius of each individual one instead of it just not applying to that corner. Maybe have it something like:

TopLeftCornerRadius: 8 --[[ Pixel ]] , 0 --[[ Scale ]]
BottomLeftCornerRadius: 0, 0
TopRightCornerRadius: 8, 0
BottomRightCornerRadius: 0, 0

3 Likes

Generally that would slow you down if you wanted to have it all be something like 18.

1 Like

It would be great with a master Radius being the normal: CornerRadius: UDim. While also having the 4 individual corners.

TopLeftCornerRadius: UDim
BottomLeftCornerRadius: UDim
TopRightCornerRadius: UDim
BottomRightCornerRadius: UDim

Meaning the normal CornerRadius would set all of them, and the individual ones being used if needed.

9 Likes

Adding on to this,

I think the same could go for UIStrokes. I’d like to have individual control over those too.,

2 Likes

Just giving this a bump because I find it simply incomprehensible how such a basic, yet critical feature is still not available.

9 Likes

i am begging all gods of roblox engineering please make this a thing

i was in a process of making a transparent inventory hotbar
i quickly found out that i either needed to switch ZIndexBehaviour to Sibling (in order to use CanvasGroups) or that i needed to use images which (big surprise) don’t match the rest of the ui

in the end, you feel nothing but frustration

4 Likes

This is probably not going to be added because of backwards compatibility.
There would be 5 properties:

  • CornerRadius: UDim
  • TopLeftRadius: UDim
  • TopRightRadius: UDim
  • BottomLeftRadius: UDim
  • BottomRightRadius: UDim

Setting CornerRadius would set all the corners to the same thing. Getting CornerRadius would return what you just set it to. But, what if you set each corner indiviually? What should CornerRadius return? The average? The biggest, or smallest? The most recent? A specific corner?

Maybe instead the solution is to have a property which enables the four corner editing, or maybe an UIAdvancedCorner or UIBorder or something dumb like that, to control each corner radius.

1 Like

I think it might be something like other properties or like when you make PartocleEmotters where the colour can change gradually and the text is strange

2 Likes

This can be achieved with CanvasGroups with UI corners. they clip ALL descendants even on the corner.

1 Like

?

I meant it can return the CornerRadius kind of the same way Color Graduation does for ParticleEmitters

1 Like

Issue with CanvasGroups is it renders as an image thus reducing the overall quality of the Interface, The thing I hate about roblox the most whenever they do something right they completely screw up something else and this is one of those cases.

6 Likes

About a week ago now, I had made this UI:
IMG_7394

The image has been compressed by Discord and Discourse (twice) at this point so what I’m trying to say might not be very clear, but the text quality is very obviously lower than it should be. If I remember in the morning, I’ll show a comparison, but the point is that having 2 CanvasGroups inside of each other will degrade the quality by a lot.

7 Likes

Bump. I’ve been wanting this ever since UICorner was introduced. There’s so many situations in UI design where you’d only want some of the corners rounded.

This is an old menu I made that would benefit from this:


In this situation I opted to just use custom images with 9Slice because the top and side bars only need 1-2 corners rounded.

4 Likes

Found the solution. Using Udim2 you can set Scale and Pixel values separately

ScaleBorderRadius: Udim2.new(0, 0, 0, 0) TopLeft, TopRight, BottomLeft, BottomRight.
PixelBorderRadius: Udim2.new(0, 0, 0, 0)

Also, Roblox can impliment a solution where just typing the number of BorderRadius inside without fully completing it, Roblox can automatically fill it in similar to AnchorPoint where as you can simply type “0.5” to make it “0.5, 0.5”. However, AnchorPoints use Vector2.new() so there could be a slight difference.

Further more, Roblox can add a RelativeTo property where ScaleBorderRadius will act upon, such as:
XY (Normal)
XX (Y will be replcaed with X scale)
YY (X will be replaced with Y scale)
YX (Normal Inverted)

RelativeTo is a simpler way to not use AspectRatios for Frames.

What if Roblox added a property that lets you choose between them? Ability to change all at once or individual corner?

Code may look like this:

if script.Parent.CornerUI.BorderRadiusType == Enum.BorderRadiusType.Individual then
     return script.Parent.CornerUI.TopLeftCornerRadius
elseif script.Parent.CornerUI.BorderRadiusType == Enum.BorderRadiusType.Combined then
     return script.Parent.CornerUI.CornerRadius
end

UDim2 doesn’t work with UICorner, unless I am minunderstanding something

Yes, but judging the circumstances of extra added properties it would be common to use Udim2.new(), currently no, you’re right, you cannot use Udim2.new() on the current CornerUI.

Bump. This would be extremely useful, I ran into the same issues, and I’m using transparent GUI, so there is no workaround.

You can use opaque frames inside a CanvasGroup, and set the GroupTransparency to what you need.

1 Like

CanvasGroups and ClipDescendants exist, if you didn’t know.