+1 vote

Hi all,

So far I can't seem to find a setting that allows it, but I know there's some clever types here so thought I'd risk asking.

Can a buttonArray be set to flat?

in Engine by (824 points)

1 Answer

+1 vote
Best answer

You can do this by creating a theme and apply it to the 'buttonArray' so all the child buttons inherit the style set in the theme.

Take a look at http://docs.godotengine.org/en/latest/tutorials/2d/gui_skinning.html#creating-a-theme

  • Create a theme
  • Add Class items 'Button'
  • Change the 'Styles' to StyleBoxFlat
by (306 points)
selected by

Thank you very much. It seems like a workaround and it's not ideal but thank you for the answer. It can get me through at least. Much appreciated.

It is not a workaround, it is a fully intentional part of the UI design of Godot.
Creating custom themes is pretty nice imo.

You are correct of course, it's just not consistent seeing as the normal button can do this but the buttonarray can't. I put in a git request and they've resolved it now for the upcoming 3.0 build.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.