+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?

in Engine by (45 points)
edited by

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.

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.

by (1,903 points)
selected by
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.