Page 1 of 1

[1.1.32] Main GUIs do not recenter after removing relative GUI

Posted: Fri Apr 30, 2021 9:04 pm
by Xorimuth
When a relative GUI is added, the main GUI recenters, but it does not go back when the relative GUI is destroyed (or hidden). See video:



Related, if the relative GUI size is extended downwards, the GUI is not recentered until after closing and reopening it, even though it clearly knows how much space it has because it only extends to a maximum size that fits nicely after recentering.



(Video seems to get stuck halfway through when viewing in the browser... please download and watch locally if you are confused!)

Doing

Code: Select all

player.opened = nil
player.opened = spidertron
after adding/removing the relative GUI has no effect.

Re: [1.1.32] Main GUIs do not recenter after removing relative GUI

Posted: Wed May 12, 2021 7:59 pm
by Rseding91
Thanks for the report however I don't believe we're going to change any of this behavior. The re-centering is a side effect of how the generic GUI system works - not specifically designed to do that but because of how the implementation works it happens.

Re: [1.1.32] Main GUIs do not recenter after removing relative GUI

Posted: Wed May 12, 2021 8:02 pm
by Xorimuth
Rseding91 wrote:
Wed May 12, 2021 7:59 pm
Thanks for the report however I don't believe we're going to change any of this behavior. The re-centering is a side effect of how the generic GUI system works - not specifically designed to do that but because of how the implementation works it happens.
Ok, would a 'recenter_gui' lua call be easy to add so that I can 'refresh' the re-centering manually?

viewtopic.php?f=28&t=98332&p=545625#p545625