The document says
SIZE_SHRINK_CENTER = 4 — Tells the parent Container to center the node in itself. It centers the Control based on its bounding box, so it doesn’t work with the fill or expand size flags. Use with size_flags_horizontal and size_flags_vertical.
But somehow it is not working for me. Is there anything besides setting this size_flag
required for automatic center alignment to work?
I know how to do it manually in the script but it is kind of a pain in the butt to scripting it for every UI component needs this. Especially when I am using a mix of GDscript and GDNative.