You've already forked godot
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user