qussuk
(jay)
February 5, 2024, 8:22pm
#1
9-Slice ImageLabel in my screen:
Is scaled using .Scale instead of .Offset
9-Slice ImageLabel in a smaller screen:
Is scaled using .Scale instead of .Offset
Corners stay at the same size, making it look bigger
How I want the corners to be in a smaller screen:
This Imagelabel uses UiScale, which also makes the corners smaller + Is scaled using .Offset instead of .Scale
How would I make make a 9-Slice ImageLabel fit into the screen and also make the corners get smaller?
Place File:
Uiproblem.rbxl (54.0 KB)
qussuk
(jay)
February 5, 2024, 10:04pm
#2
This reply solved what I was trying to achieve. Make sure to check it out if you get the same issue!
Alright. It appears I fixed my issue.
local function calculateSliceScale(screenHeight: number)
local constant = 2700
return screenHeight / constant
end
I calculated 2700 by first setting the SliceScale to what looks good on my screen, and then used
s/x = L
Where s is the height of my screen, in pixels, and L is the SliceScale that looked good on my resolution.
For example, my screen is 1080 pixels in height (retrieved via workspace.CurrentCamera.ViewportSize.Y). Additionally, the best …
system
(system)
Closed
February 19, 2024, 10:04pm
#3
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.