diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-04-11 17:49:46 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-11 17:49:46 +0200 |
commit | 9528aa42be2cffb24971955191385b6603abb0dd (patch) | |
tree | 7c38af9aec39e9305ecb36dc5692fae5b67cbcb3 | |
parent | 2507b2b006c3f863e901a15166bc56054c20a22e (diff) | |
parent | 2c85599218023f3f02c18d46c99b6ebe5d87767c (diff) |
Merge pull request #60102 from KoBeWi/graphememe
-rw-r--r-- | doc/classes/TextServer.xml | 4 | ||||
-rw-r--r-- | servers/text_server.cpp | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/doc/classes/TextServer.xml b/doc/classes/TextServer.xml index b4339bef11..9ef800d7e1 100644 --- a/doc/classes/TextServer.xml +++ b/doc/classes/TextServer.xml @@ -1249,9 +1249,9 @@ <method name="shaped_text_get_word_breaks" qualifiers="const"> <return type="PackedInt32Array" /> <argument index="0" name="shaped" type="RID" /> - <argument index="1" name="grapheme_flags" type="int" /> + <argument index="1" name="grapheme_flags" type="int" default="264" /> <description> - Breaks text into words and returns array of character ranges. + Breaks text into words and returns array of character ranges. Use [code]grapheme_flags[/code] to set what characters are used for breaking (see [enum GraphemeFlag]). </description> </method> <method name="shaped_text_hit_test_grapheme" qualifiers="const"> diff --git a/servers/text_server.cpp b/servers/text_server.cpp index 6183fa2cbc..7e3fde6a1f 100644 --- a/servers/text_server.cpp +++ b/servers/text_server.cpp @@ -395,7 +395,7 @@ void TextServer::_bind_methods() { ClassDB::bind_method(D_METHOD("shaped_text_get_range", "shaped"), &TextServer::shaped_text_get_range); ClassDB::bind_method(D_METHOD("shaped_text_get_line_breaks_adv", "shaped", "width", "start", "once", "break_flags"), &TextServer::shaped_text_get_line_breaks_adv, DEFVAL(0), DEFVAL(true), DEFVAL(BREAK_MANDATORY | BREAK_WORD_BOUND)); ClassDB::bind_method(D_METHOD("shaped_text_get_line_breaks", "shaped", "width", "start", "break_flags"), &TextServer::shaped_text_get_line_breaks, DEFVAL(0), DEFVAL(BREAK_MANDATORY | BREAK_WORD_BOUND)); - ClassDB::bind_method(D_METHOD("shaped_text_get_word_breaks", "shaped", "grapheme_flags"), &TextServer::shaped_text_get_word_breaks); + ClassDB::bind_method(D_METHOD("shaped_text_get_word_breaks", "shaped", "grapheme_flags"), &TextServer::shaped_text_get_word_breaks, DEFVAL(GRAPHEME_IS_SPACE | GRAPHEME_IS_PUNCTUATION)); ClassDB::bind_method(D_METHOD("shaped_text_get_trim_pos", "shaped"), &TextServer::shaped_text_get_trim_pos); ClassDB::bind_method(D_METHOD("shaped_text_get_ellipsis_pos", "shaped"), &TextServer::shaped_text_get_ellipsis_pos); |