Hi everyone
My game has something like a file explorer for saved files. It uses code to make a button for every saved file in user://
I'd like to use code to set the width of each button. So far, the width just varies depending on the length of the name of the saved filename.
I've tried
button.set("layout/transform/size.x", 340)
This does nothing, although it doesn't produce an error message.
I've also tried
button.rect_min_size = Vector2(340, 65) and
button.rect_size = Vector2(340, 65)
These produce this error message:
Invalid set index 'rect_min_size' (on base: 'Button') with value of type 'Vector2'.
Does anyone know the correct way to do it?
Thanks