I have an inventory system where the slots are panels made with code and they fill a grid that I make in a new scene. I am trying to figure out how to change the theme of the slots with a script so they don’t look like a black box. I can’t find anything when I look it up so I was hoping someone here could help.
You can use Control.add_theme_*_override() methods, e.g. Control.add_theme_stylebox_override() or Control.add_theme_font_override().
Theme resources change the Control’s appearance. If you change the Theme on a Control node, it affects all of its children. To override some of the theme’s parameters, call one of the add_theme_*_override methods, like add_theme_font_override.
What I’ve done for a thing in my project is to create a .TRES resource file out of a custom theme.
Control->Theme-> add a new theme then edit it the way you want it to look. The options are not only in the Inspector but also in a tab in the bottom where the Output is. Once you’re done, right-click the Theme box and select: Save as… and export it.