Improve shaped_text_get_word_breaks()
This commit is contained in:
parent
83d2673772
commit
2c85599218
|
@ -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">
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue