diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2021-08-09 00:59:35 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-09 00:59:35 +0200 |
commit | 2df1765fc28052f25a6a12f3f5c5a974a88b9134 (patch) | |
tree | 8beebed7d2f3f26c40c5bd5d5905a80acd214dc9 /scene/resources/text_paragraph.cpp | |
parent | 7fc570b5ac4527e10a394da578f649b1f577b4dc (diff) | |
parent | 7c3c5603d0a3208d6bee186f50857b15a02419d6 (diff) |
Merge pull request #49587 from bruvzg/text_server_inline_align
[Text Server] Improve object (image/table) inline alignment.
Diffstat (limited to 'scene/resources/text_paragraph.cpp')
-rw-r--r-- | scene/resources/text_paragraph.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/scene/resources/text_paragraph.cpp b/scene/resources/text_paragraph.cpp index 958c94fe31..ffae551570 100644 --- a/scene/resources/text_paragraph.cpp +++ b/scene/resources/text_paragraph.cpp @@ -59,8 +59,8 @@ void TextParagraph::_bind_methods() { ClassDB::bind_method(D_METHOD("clear_dropcap"), &TextParagraph::clear_dropcap); ClassDB::bind_method(D_METHOD("add_string", "text", "fonts", "size", "opentype_features", "language"), &TextParagraph::add_string, DEFVAL(Dictionary()), DEFVAL("")); - ClassDB::bind_method(D_METHOD("add_object", "key", "size", "inline_align", "length"), &TextParagraph::add_object, DEFVAL(VALIGN_CENTER), DEFVAL(1)); - ClassDB::bind_method(D_METHOD("resize_object", "key", "size", "inline_align"), &TextParagraph::resize_object, DEFVAL(VALIGN_CENTER)); + ClassDB::bind_method(D_METHOD("add_object", "key", "size", "inline_align", "length"), &TextParagraph::add_object, DEFVAL(INLINE_ALIGN_CENTER), DEFVAL(1)); + ClassDB::bind_method(D_METHOD("resize_object", "key", "size", "inline_align"), &TextParagraph::resize_object, DEFVAL(INLINE_ALIGN_CENTER)); ClassDB::bind_method(D_METHOD("set_align", "align"), &TextParagraph::set_align); ClassDB::bind_method(D_METHOD("get_align"), &TextParagraph::get_align); @@ -290,13 +290,13 @@ void TextParagraph::set_bidi_override(const Vector<Vector2i> &p_override) { dirty_lines = true; } -bool TextParagraph::add_object(Variant p_key, const Size2 &p_size, VAlign p_inline_align, int p_length) { +bool TextParagraph::add_object(Variant p_key, const Size2 &p_size, InlineAlign p_inline_align, int p_length) { bool res = TS->shaped_text_add_object(rid, p_key, p_size, p_inline_align, p_length); dirty_lines = true; return res; } -bool TextParagraph::resize_object(Variant p_key, const Size2 &p_size, VAlign p_inline_align) { +bool TextParagraph::resize_object(Variant p_key, const Size2 &p_size, InlineAlign p_inline_align) { bool res = TS->shaped_text_resize_object(rid, p_key, p_size, p_inline_align); dirty_lines = true; return res; |