![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | Leon12 |
Hello,
I’m making a responsive game in which I want the font sizes to be changed depending on the user’s screen size, but it does not work when I try to change it by code using “Control.add_theme_font_size_override()” or “Control.add_theme_constant_override()” with the same arguments. I’ve also tried removing some posible “default” constant override with the same name that maybe was existing there before, but neither worked. Here’s how I reproduced it:
var font_size : int = int(settings.resolution.x * 0.35)
play_button_label.add_theme_font_size_override("theme_override_font_sizes/font_size", font_size)
Thanks in advance!