Properties window doing mathematical calculations?

Mostly when working with GUIs (though it can happen in positioning parts as well), I want to create a series of objects with x pixels/studs of padding between each other. For instance, say I have multiple 22x22 px buttons and want there to be 5px of padding between each of them. I can find the position I should set them to with (i-1)*27, but at least for me, that takes longer to do on the fly in my head than I’d like. It’d be cool if while placing the ninth button, I could type into the properties window:
and studio would calculate the value and fill it in with 216. (currently it just drops the *8 and sets it to 27)

For anonymous united (thanks for the reminder @buildthomas):

  • Yes
  • No

0 voters

14 Likes
local sel = game.Selection:Get()[1]
local padding = 5
for i=1,7 do
   local b = sel:Clone()
   b.Position = UDim2.new(0,0,0,(padding + sel.Size.Y.Offset) * i)
   b.Parent = sel.Parent
end

Took longer to type that than it would to do 7 buttons manually if the properties window did calculations. (It’s reusable, sure, but you often only need to do it once)
Plus with this suggestion, you could do fractions like typing in 1/16 if you’re editing scale.

this feature is why I love Solidworks and Autodesk Inventor and don’t love all other 3D editing programs.

Echo, what are you doing? There’s no poll in your OP! (for the anonymous under us)

This is genius, never thought about it - yet so helpful!

I love that CmdUtil does this - I sometimes use it as an impromptu calculator - and this would be a great addition to Studio.

Was going to post a new feature request if I didn’t find this.
Over the years, I’ve grown pretty tired of having to do calculations in my head/browser.

I was… a bit awed and pleasantly surprised (I know, pretty basic feature, it shows how much it is needed though) when I realised the Affinity Designer and Photo edting software supported this for their transform properties.
It made my life way easier when trying to position stuff perfectly.

I believe this would be a fairly basic feature to implement, and it could save a lot of time and brainpower on our end.

1 Like

UI and map design has become my only use for calc.exe due to this feature missing lol.

2 Likes

This is implemented in some number fields in Studio, but is inconsistent and not implemented across the board. See Mathematical shorthand operators have been broken in some numerical input boxes

2 Likes