Page 1 of 1

Can some give a quick write up on GuiHorizontalSizing/GuiVerticalSizing

Posted: Sat Nov 30, 2019 1:15 pm
by aMoistKite
I honestly wonder why no tutorial really mentions what exactly each option means.

GuiHorizontalSizing:
  • aspectCenter
  • aspectLeft
  • AspectRight
  • center
  • right
  • width
  • left
  • relative
  • windowRelative
GuiVerticalSizing:
  • aspectCenter
  • aspectBottom
  • AspectTop
  • center
  • bottom
  • top
  • height
  • relative
  • windowRelative

Re: Can some give a quick write up on GuiHorizontalSizing/GuiVerticalSizing

Posted: Sat Nov 30, 2019 5:48 pm
by Happenstance
Center
  • Centers the object in it's container. Only the position is changed, not the extent (width/height) of the GUI control.
Right/Left/Top/Bottom
  • Object will change position (not extent) when its container object is resized. This allows you to keep a control positioned at a specific position/offset relative to its container. One counter-intuitive bit about this: the setting works off of the opposite edge, so choosing 'Right' will reposition based off of the left edge of a control, choosing 'Top' offsets based on the bottom edge, etc.
Width/Height
  • Object will adjust its extent (width/height) whenever its container object is resized. Only the extent is adjusted, the position will remain the same.
Relative
  • Object will adjust both extent (width/height) and position whenever its container object is resized.
WindowRelative
  • I believe this was intended specifically for GuiWindowCtrls so that they could maintain position relative to their parent container when collapsed. I haven't looked at the code but I would assume it works like the 'Relative' setting but also takes into account collapsed size.
AspectRight/AspectLeft/AspectTop/AspectBottom/AspectCenter
  • These were newer options added in T3D at the end of the GG/TorquePowered fiasco I believe so there's not much info on them and I'm not sure any UIs currently use them. Looking at the code, it looks like they do the same as the non-aspect versions with regards to repositioning/resizing a control when its container object is resized. The main difference is these settings use the change in aspect ratio of the container object when calculating a new size/position.

Re: Can some give a quick write up on GuiHorizontalSizing/GuiVerticalSizing

Posted: Sun Dec 01, 2019 7:40 am
by aMoistKite
Thanks mate.

Re: Can some give a quick write up on GuiHorizontalSizing/GuiVerticalSizing

Posted: Sun Dec 01, 2019 10:25 am
by Azaezel
AspectRight/AspectLeft/AspectTop/AspectBottom/AspectCenter
  • These were newer options added in T3D at the end of the GG/TorquePowered fiasco I believe so there's not much info on them and I'm not sure any UIs currently use them. Looking at the code, it looks like they do the same as the non-aspect versions with regards to repositioning/resizing a control when its container object is resized. The main difference is these settings use the change in aspect ratio of the container object when calculating a new size/position.
didn't exactly pick the best naming convetions there, I guess. but yeah, effectively adds exrtra space to the <suffix> while maintaining the originally designed aspect ratio. (4:3 vs 16:9 swapping for instance with the legacy stuff tends to warp if you stick to pure relative)