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

@@ -579,7 +579,7 @@ void AbstractPolygon2DEditor::forward_canvas_draw_over_viewport(Control *p_overl
String num = String::num(vertex.vertex);
Size2 num_size = font->get_string_size(num, HORIZONTAL_ALIGNMENT_LEFT, -1, font_size);
const float outline_size = 4;
Color font_color = get_theme_color(SNAME("font_color"), EditorStringName(Editor));
Color font_color = get_theme_color(SceneStringName(font_color), EditorStringName(Editor));
Color outline_color = font_color.inverted();
p_overlay->draw_string_outline(font, point - num_size * 0.5, num, HORIZONTAL_ALIGNMENT_LEFT, -1, font_size, outline_size, outline_color);
p_overlay->draw_string(font, point - num_size * 0.5, num, HORIZONTAL_ALIGNMENT_LEFT, -1, font_size, font_color);