This site is currently in read-only mode during migration to a new platform.
You cannot post questions, answers or comments, as they would be lost during the migration otherwise.
+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 (46 points)
edited by

For the reference, the (for now) almost empty class reference for Theme:

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,957 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 Frequently asked questions and 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 [email protected] with your username.