MouseButton1Click Applies to Borders

Its actually annoying that Roblox doesn’t have padding options within a gui already so what if you wanted to use roblox borders to simulate padding slightly, well you can’t do that ether because if you click the button’s borders it doesn’t count as the button? Ether make the borders count as part of a button or create another event defining borders as clickable.

Lets compare it to a web ui, when you add padding to a div is the padding clickable? Yes it is.

Needed Attention, should already be part of gui click events.

You should move your thread to Client Features, makes it more likely for the right people to see it

I bet @Sharksie would love this one.

Jokes aside, this is a weird issue because the clickable region is determined by AbsolutePosition and AbsoluteSize. Changing this to account for the border would result in some very… strange things. Culling rules would change, enter/leave would change, and relative positioning would change since the UDim system uses this.

Alternatively, we could do it at the actual bounds check level. I’m not sure if it makes a lot of sense to change it at this point.

I’d personally like to see a padding property that children use in their UDim calculations.

4 Likes

Yeah I think that would be the best option since margin is already semi-doable with the position factor, I feel padding is not very well supported for gui creation. I still believe that not changing the border factor is very unusual for any gui since if you are creating the button any factor included in the button should be accounted for such as the border since it effects the width and height of the button theoretically. Imagine you have 16px border of the same color to add a spacing effect and a user clicks on border and nothing happens. I think changing it is actually weird youre right but it doesn’t make sense the way it is.