Hey guys. I'm not much of a commenter here, but I have a question; How do I change the color of a node: 'panel'. Good 4? Currently my code looks like this (non-functional):func paint_the_round(btn_node: TextureButton):
var panel = btn_node.get_node('Panel').get_theme_stylebox('StyleBoxFlat')
print("bg_color before -> ",panel.bg_color)
panel.bg_color = (Color(1, 0.4, 0.21, 1))
print("bg_color after -> ",panel.bg_color)
btn_node.get_node('Panel').queue_redraw()

  • Toxe replied to this.

    I'm not sure exactly why that wouldn't work. My guess would be it doesn't know to update its theme. Try assigning it back to Panel.panel (lol how poorly named) and see if that gets it to update. If that doesn't work, maybe try grabbing the entire theme, replacing the color, and assigning that.

      micadev Personally I would just create a theme type variation and assign that to panel.theme_type_variation.