Merge pull request #48528 from sent44/textedit

Expose get_total_visible_rows method to GDScript
This commit is contained in:
Rémi Verschelde 2021-05-18 09:06:24 +02:00 committed by GitHub
commit 510030fedc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 0 deletions

View file

@ -283,6 +283,13 @@
Returns the selection end line.
</description>
</method>
<method name="get_visible_line_count" qualifiers="const">
<return type="int">
</return>
<description>
Returns the number of visible lines, including wrapped text.
</description>
</method>
<method name="get_word_under_cursor" qualifiers="const">
<return type="String">
</return>

View file

@ -6853,6 +6853,7 @@ void TextEdit::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_line_count"), &TextEdit::get_line_count);
ClassDB::bind_method(D_METHOD("get_text"), &TextEdit::get_text);
ClassDB::bind_method(D_METHOD("get_line", "line"), &TextEdit::get_line);
ClassDB::bind_method(D_METHOD("get_visible_line_count"), &TextEdit::get_total_visible_rows);
ClassDB::bind_method(D_METHOD("set_line", "line", "new_text"), &TextEdit::set_line);
ClassDB::bind_method(D_METHOD("set_structured_text_bidi_override", "parser"), &TextEdit::set_structured_text_bidi_override);