+1 vote

There is methods in Theme, which allow to manipulate clear color of it:

void clear_color( String name, String type )
void set_color( String name, String type, Color color )

But there is no explanation of format of the first and second argument.

Can someone explain please?

asked May 19, 2016 in Engine by rinart73 (43 points)
edited May 19, 2016 by Akien

For the reference, the (for now) almost empty class reference for Theme: http://docs.godotengine.org/en/latest/classes/class_theme.html

It looks like those name and type arguments are used in almost all methods, so they probably refer to some components of the theme.

Edditing theme is way easier using the GUI than script.
http://docs.godotengine.org/en/latest/tutorials/2d/gui_skinning.html#creating-a-theme

I'd like to know both ways to edit gui

1 Answer

0 votes
Best answer

Based on the source code, the type argument should be one of "icons", "styles", "fonts", "colors" and "constants".

Note sure about the name argument, you'd have to experiment with it a bit. The class reference needs some work by someone able to read C++ to be filled up; the whole API is a bit confusing though IMO, so maybe it should be reworked a bit by developers to be made more user-friendly.

answered May 19, 2016 by Akien (1,843 points)
selected May 19, 2016 by rinart73
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.