A button can be set to "flat" but can a buttonarray?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Robster
:warning: Old Version Published before Godot 3 was released.

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?

:bust_in_silhouette: Reply From: Rasmus

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

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.

Robster | 2016-11-25 21:35

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

Rasmus | 2016-11-25 21:47

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.

Robster | 2016-11-30 06:54