I want to create a panel that horizontally centers the buttons within it. If the screen width is not enough for all the buttons, then the panel should be horizontally scrollable
Currently, I have the following node hieararchy:
+ PanelContainer
+ ScrollContainer
+ HBoxContainer
+ Button 1
+ ...
+ Button n
The ScrollContainer has a full rect layout and the HBoxContainer center layout
This is not working, however. The buttons end up on the left side of the screen even though they are centered in the editor.
What am I doing wrong here?
Basically, I want the buttons to be horizontally centered and if there are too many buttons to fit on the screen horizontally, then the user should be able to scroll horizontally to view the off-screen buttons