nezuo
(nezuo)
February 22, 2020, 7:01pm
#1
I am using UIScale to add a zooming feature to my plugin. When zoomed out this is what an image looks like without 9-Slice.
With 9-Slice the same image looks like this:
It’s edge gets cut off and the bottom looks weird. Is this a bug or is there a way to fix this.
For reference, here is also what the 9-Slice image looks like with a normal zoom:
1 Like
I don’t think you need 9-slice, simply make the thing offset because if it doesn’t fit the screen they can zoom out
I can’t seem to reproduce it, could it maybe that you didn’t configure the 9-Slice property correctly?
0.5x Scale
1x Scale
1.5x Scale
Could you send the Properties you set for the 9-Slice?
nezuo
(nezuo)
February 22, 2020, 8:06pm
#4
I have no idea what this means. I am using 9-Slice because the nodes can have different sizes.
nezuo
(nezuo)
February 22, 2020, 8:10pm
#6
I should mention, this UIScale is not inside the image. It is inside the parent frame.
Mind also sending the Image ID that I can test it out myself?
This is the image I tried it out with:
(300x300 px)
And this is my SliceCenter Configuration and it works fine:
nezuo
(nezuo)
February 22, 2020, 8:13pm
#8
I don’t think that’s how 9-Slice works? You set the min and max bounds to the same coordinate.
My bad, fixed it. But even after fixing it, it works fine on my side.
My only guess is that you set the properties wrong.
nezuo
(nezuo)
February 22, 2020, 8:17pm
#10
You are using a UIScale object in the image’s parent?
It was parented to ScreenGui
, but parenting it to the Frame
Instance worked as well, and it was not cutting off randomly for me.
nezuo
(nezuo)
February 22, 2020, 8:19pm
#12
Oops, accidently clicked solution. Maybe use an ImageButton like I am?
I was doing that from the start.
Could you send the Image ID so I can try to replicate this issue myself?
nezuo
(nezuo)
February 22, 2020, 8:26pm
#14
The image ID is mine though, I don’t think you can use it. 4642186292
Yeah, my guess was right. Your SliceCenter
Property is configured wrongly, which causes the cut-off on the right side. Try setting it to 10, 10, 130, 30
and tell me the new results. (Issue was that you put at the 3rd number the total image width, which means you wanted to slice it at the end of the image, not right before the corners)
nezuo
(nezuo)
February 22, 2020, 8:34pm
#16
Yes, this worked. I thought the image was 150 pixels in width but I guess I was wrong. Thanks!