1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-07 12:30:27 +00:00

[Scene] Add SceneStringNames::font(_size/_color)

This commit is contained in:
A Thousand Ships
2024-05-14 15:57:29 +02:00
parent b435551682
commit d519715d94
77 changed files with 453 additions and 446 deletions

View File

@@ -892,9 +892,9 @@ void FontPreview::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_DRAW: {
// Draw font name (style).
Ref<Font> font = get_theme_font(SNAME("font"), SNAME("Label"));
int font_size = get_theme_font_size(SNAME("font_size"), SNAME("Label"));
Color text_color = get_theme_color(SNAME("font_color"), SNAME("Label"));
Ref<Font> font = get_theme_font(SceneStringName(font), SNAME("Label"));
int font_size = get_theme_font_size(SceneStringName(font_size), SNAME("Label"));
Color text_color = get_theme_color(SceneStringName(font_color), SNAME("Label"));
// Draw font preview.
bool prev_ok = true;