Can some give a quick write up on GuiHorizontalSizing/GuiVerticalSizing

There are no stupid questions, just stupid answers.
4 posts Page 1 of 1
aMoistKite
Posts: 21
Joined: Wed Mar 06, 2019 10:07 am
by aMoistKite » Sat Nov 30, 2019 1:15 pm
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
Happenstance
Posts: 93
Joined: Sat Apr 11, 2015 9:08 pm
by Happenstance » Sat Nov 30, 2019 5:48 pm
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.
aMoistKite
Posts: 21
Joined: Wed Mar 06, 2019 10:07 am
by aMoistKite » Sun Dec 01, 2019 7:40 am
Thanks mate.
Azaezel
Posts: 473
Joined: Tue Feb 03, 2015 9:50 pm
 
by Azaezel » Sun Dec 01, 2019 10:25 am
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)
4 posts Page 1 of 1

Who is online

Users browsing this forum: No registered users and 6 guests