Adjusting UI Instance Size, unecessary issues and annoyances

Currently it is extremly annoying to use UIScale
it doesnt really do the job i want and the only alternative that i have right now is doing it the hard and annoying way (it really frustrates me)

to tween a object by 5 pixels both on X and Y axis i have to manually tween it by adding both udim2’s and making sure i have a copy of the original size to then tween it back

this is seriously annoying, makes my code longer and its just wasting my time even though a solution would be simple

my suggestion to fix this problem that probably other developers have is removing UIScale
and adding UISizeAdjustment instance

it has a field called
AdjustmentType : Enum.UISizeAdjustmentType
Which can be: Scale (does exacly what UIScale would do) and Adjust

when Scale is chosen 1 field appears
Scale : number

when Adjust is chosen 2 field appears
ScaleAdjustment : UDim
OffsetAdjustment: UDim

ScaleAdjustment Adds values from UDim to their respective entries in UDim2 Scale
OffsetAdjustment Adds values from UDim to their respective entries in UDim2 Offset

this would greatly improve work efficiency, clean up code, and this change can be done automatically converting all UIScale instances into UISizeAdjustment set to Scale and any instance.new with UIScale just getting converted to instance.new with UISizeAdjustment

UISizeAdjustment has AdjustmentType defaulted to Scale for compability with Older UIScale code however we will now have the benifits of Adjust

UISizeAdjustment adds the values after everything was applied to the ui instance
UISizeAdjustment can also help fix issues UIScale has with Rectangles that have very big differences in X and Y Size where scaling it by x1.025 makes X scale very wide and Y scale very small, original UIScale really only works good on Square elements, having the option to use Adjust to manually specify scale ups without having to keep original frame size is great it also lets us scale elements that have size modified by something like a UIGridLayout easier without needing excessive frames

Old way

local OriginalSize = Frame.Size

TweenService:Create(Frame, TweenInfo.new(1, ...yea yea), {
	Size = OriginalSize + UDim2.new(0, 5, 0, 5)
}):Play()

task.wait(1)

TweenService:Create(Frame, TweenInfo.new(1, ...yea yea), {
	Size = OriginalSize
}):Play()

ofc the code above wouldnt even work with UIGridLayout where UIScale works

with UISizeAdjustment

local Adjust = Instance.new("UISizeAdjustment", Frame)
Adjust.AdjustmentType = Enum.UISizeAdjustmentType.Adjust

TweenService:Create(Adjust , TweenInfo.new(1, ...yea yea), {
	OffsetAdjustment = UDim.new(5, 5)
}):Play()

task.wait(1)

TweenService:Create(Adjust , TweenInfo.new(1, ...yea yea), {
	OffsetAdjustment = UDim.new(0, 0)
}):Play()

not only it avoids having a original Size variable, this will also work with elements modified by UIGridLayout where the old method wouldnt even work and u would be forced to either use UIScale or use UIListLayout and need to have variables that keep original sizes somewhere which becomes a annoying issue with automated code on massive scale where devs would just use UIScale instead and cope with it scaling rectangles with big ratios wierdly

ofc i might have went overboard with removing UIScale entirely and replacing it with this however i also wouldnt see the reason to keep UIScale with UISizeAdjustment Around that can have a Scale option too and having UISizeAdjustment not have the Scale feature would seem wierd for me

However i would also not mind if UISizeAdjustment perks were just added onto the existing UIScale since i would prefer having the benifits over being angry something has a different name that doesnt really matter in the first place because my players wont see the name difference but they will ABSOLUTELY see the UIScale scaling my rectangles wierdly

i hope this feature will be considered to be added, i really want this and it would greatly make my work easier and less annoying im very suprised this wasnt added in the first place with uiscale and i couldnt find any post asking for something like this to be added so im here now requesting this.

i hope my fellow programmers or ui designers also tell their opinions on this because in my opinion this addition shouldve been here from the start

I’m not sure what the supposed benefits are (and it may just be me, but having trouble understanding your explanations :sweat_smile:).

But from the parts I understand, it seems like there are already proper solutions to your problem. If you are willing, maybe you can provide some diagrams and explanation of what you want to achieve?

1 Like

There are Solutions i never said its “impossible” to do what i want, im asking for a simplier solution to my problem

When i want to tween a button to size up when i hover over it i can use UIScale to do this, however the issue lies within the fact UIScale just scales up X and Y values by a multiplier
this results in a unwanted behaviour on wide buttons

I can manually scale the buttons up however this requires me to have a variable that stores buttons original size which not only costs me memory it makes it very annoying to have buttons that change size on runtime, scaling the buttons manually also will force me to use extra ui elements to scale Elements in a UIGridLayout the solution will also make them ignore Padding the UIGridLayout Provides

The Solution i Provided was to Replace UIScale (or add the features to the UIScale) with UISizeAdjustment
Which will let us chose between Scaling like UIScale or Adjusting by adding OffsetAdjustment UDim and ScaleAdjustment UDim to its Size (Which UIScale does by multiplying Offset and Scale by Scale the number) this will not only make it faster to Scale UI Elements using for Example Tweens by a Specific Amount it will Remove the Need of wasting addational memory to keep the Elements Original Size because roblox already does that in a way

This will also make it possible to do this on UIGridLayout Elements like UIScale does because the “annoying” alternative requires something that can end up with behaviour someone wouldnt want
This also fixes the issue of having to do extra work for UIElements that change their sizes on runtime because u would have to update the OriginalSize variable but also make sure it doesnt update the changes from Tweens but now with UISizeAdjustment u dont need to do this because its all on Runtime already

im not really good at explaining but what im asking for is a Quality of Life Feature not something that doesnt exist and the Proper Solutions just make my work tideous for no reason because what im asking for shouldve been already here added along UIScale functionality