THEMES - Font changes makes theme usage a broken mess for me, help! How can I have multiple fonts in the same theme?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By The_Black_Chess_King

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.

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.

Ertain | 2019-11-02 17:06

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.

The_Black_Chess_King | 2019-11-02 18:13

:bust_in_silhouette: Reply From: eons

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).