auto_center (which is ment to be "auto-center-on-resize") is named incorrectly and is misleading.
LugGuiElement::force_auto_center() does not force an auto re-center.
Re-Production
All executed ingame with /c
Code: Select all
game.player.gui.screen.add{name='test',type='frame'} -- new frame in the top left
game.player.gui.screen.test.auto_center -- returns false
game.player.gui.screen.test.auto_center = true -- frame remains in top left
game.player.gui.screen.test.force_auto_center() -- frame remains in top left
game.player.gui.screen.test.add{name='drag',type='frame'} -- frame is now in the center, due to resize