diff options
author | bruvzg <7645683+bruvzg@users.noreply.github.com> | 2022-05-09 12:47:10 +0300 |
---|---|---|
committer | bruvzg <7645683+bruvzg@users.noreply.github.com> | 2022-07-06 14:12:36 +0300 |
commit | 344ba0ffaf3f7d39bd5a1304ba6a6070d442a963 (patch) | |
tree | 318acb34fb6d8915522c0c05e5c9fb916f8e1227 /editor/plugins/abstract_polygon_2d_editor.cpp | |
parent | cf194847468e00de682074a14b2cf4ccf7b69188 (diff) |
Refactor Font configuration and import UI, and Font resources.
Diffstat (limited to 'editor/plugins/abstract_polygon_2d_editor.cpp')
-rw-r--r-- | editor/plugins/abstract_polygon_2d_editor.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/editor/plugins/abstract_polygon_2d_editor.cpp b/editor/plugins/abstract_polygon_2d_editor.cpp index ad6d8e6379..affe46aaae 100644 --- a/editor/plugins/abstract_polygon_2d_editor.cpp +++ b/editor/plugins/abstract_polygon_2d_editor.cpp @@ -565,7 +565,7 @@ void AbstractPolygon2DEditor::forward_canvas_draw_over_viewport(Control *p_overl Ref<Font> font = get_theme_font(SNAME("font"), SNAME("Label")); int font_size = get_theme_font_size(SNAME("font_size"), SNAME("Label")); String num = String::num(vertex.vertex); - Size2 num_size = font->get_string_size(num, font_size); + Size2 num_size = font->get_string_size(num, HORIZONTAL_ALIGNMENT_LEFT, -1, font_size); p_overlay->draw_string(font, point - num_size * 0.5, num, HORIZONTAL_ALIGNMENT_LEFT, -1, font_size, Color(1.0, 1.0, 1.0, 0.5)); } } |