summaryrefslogtreecommitdiff
path: root/doc/classes
diff options
context:
space:
mode:
authorPouleyKetchoupp <pouleyketchoup@gmail.com>2021-02-11 09:33:45 -0700
committerPouleyKetchoupp <pouleyketchoup@gmail.com>2021-02-15 17:26:58 -0700
commit4586357ddef6f650974b915132790bf4ed5187f6 (patch)
treea34cfbc30d6a49532407cc2a2fd6382dbea73e99 /doc/classes
parenta59286f0198c7a3141fc9a8af4d458c7dcfbf653 (diff)
Expose RichTextLabel selection to script
Expose existing get_selection_text and add methods to get the current selection index from and index to.
Diffstat (limited to 'doc/classes')
-rw-r--r--doc/classes/RichTextLabel.xml21
1 files changed, 21 insertions, 0 deletions
diff --git a/doc/classes/RichTextLabel.xml b/doc/classes/RichTextLabel.xml
index fd32e86d7e..7ca70f5a7a 100644
--- a/doc/classes/RichTextLabel.xml
+++ b/doc/classes/RichTextLabel.xml
@@ -80,6 +80,27 @@
Returns the total number of paragraphs (newlines or [code]p[/code] tags in the tag stack's text tags). Considers wrapped text as one paragraph.
</description>
</method>
+ <method name="get_selected_text" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ Returns the current selection text. Does not include BBCodes.
+ </description>
+ </method>
+ <method name="get_selection_from" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Returns the current selection first character index if a selection is active, [code]-1[/code] otherwise. Does not include BBCodes.
+ </description>
+ </method>
+ <method name="get_selection_to" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Returns the current selection last character index if a selection is active, [code]-1[/code] otherwise. Does not include BBCodes.
+ </description>
+ </method>
<method name="get_total_character_count" qualifiers="const">
<return type="int">
</return>