0 votes

Aham, I am not big brain, if you are big brain, please help a brother out.

I would like to make a theme for everything in my game, but by using one theme, so it's easy for me to manipulate and design a decent UI Style.

So, Can I have 2 types of fonts in one Theme, for example:


FONT TYPE 1 -> Main title type, fonts are big.
FONT TYPE 2 -> Subtitle type, fonts are smaller.

I can create them inside a theme, but cannot find a way to assign them to my nodes. Only the default one is assigned. Or are these only usable through code? It would be really nice to assign them in the inspector.

The way I am working right now, at least for me, defeats the purpose of having a theme, I have a theme for everything, MENU BUTTONS THEME, INVENTORY BUTTONS THEME, PICKITEMS THEME, ENEMY UI THEME.

Can't I have 1 Theme and sub-themes like, LABEL TYPE 1, LABEL TYPE 2.

asked Nov 2, 2019 in Engine by The_Black_Chess_King (265 points)

Have you looked at the "Theme" and "Custom Style" sections for Control nodes in the Inspector? You should be able to assign your custom theme through that.

Ahm, yea, that's the normal way of applying a theme, but how I get a custom style from my master theme, that's my question. After all, we can create multiple fonts and labels inside a theme, but how do we assign them to a node?

I looked more into it and through the inspector I think it is not possible, I would like to avoid creating a script for every piece I want to use a specific label from a theme, that's why I thought if there was a route in the inspector.

1 Answer

+1 vote
Best answer

AFAIK, you can only put one type of font to a theme (it makes sense somehow because is a theme after all).

To make multiple ones you can duplicate your theme and change the font on the duplicate, all sub resources should be linked so changes on one theme will affect all references (but it may also imply that you should save those resources in separate files if the themes are not embedded on a scene, to keep referencing the same resources).

answered Nov 2, 2019 by eons (7,764 points)
selected Nov 2, 2019 by The_Black_Chess_King
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.