summaryrefslogtreecommitdiffstats
path: root/doc/classes/TreeItem.xml
diff options
context:
space:
mode:
authorA Thousand Ships <96648715+AThousandShips@users.noreply.github.com>2024-01-20 17:55:34 +0100
committerA Thousand Ships <96648715+AThousandShips@users.noreply.github.com>2024-01-23 12:07:43 +0100
commit257d03681cd9a61a67c6d69637aa87c45be71ebb (patch)
tree1aaf8136bc7604abf0358c29ebfa3b821cc604d8 /doc/classes/TreeItem.xml
parent6fea273ed3df7d4be9674d35aae698731fa823ea (diff)
downloadredot-engine-257d03681cd9a61a67c6d69637aa87c45be71ebb.tar.gz
Use callable for `TreeItem` custom draw
Deprecating old functionality
Diffstat (limited to 'doc/classes/TreeItem.xml')
-rw-r--r--doc/classes/TreeItem.xml19
1 files changed, 18 insertions, 1 deletions
diff --git a/doc/classes/TreeItem.xml b/doc/classes/TreeItem.xml
index 597a363514..3b8a4c8872 100644
--- a/doc/classes/TreeItem.xml
+++ b/doc/classes/TreeItem.xml
@@ -160,6 +160,13 @@
Returns the custom color of column [param column].
</description>
</method>
+ <method name="get_custom_draw_callback" qualifiers="const">
+ <return type="Callable" />
+ <param index="0" name="column" type="int" />
+ <description>
+ Returns the custom callback of column [param column].
+ </description>
+ </method>
<method name="get_custom_font" qualifiers="const">
<return type="Font" />
<param index="0" name="column" type="int" />
@@ -553,7 +560,7 @@
Sets the given column's custom color.
</description>
</method>
- <method name="set_custom_draw">
+ <method name="set_custom_draw" is_deprecated="true">
<return type="void" />
<param index="0" name="column" type="int" />
<param index="1" name="object" type="Object" />
@@ -561,6 +568,16 @@
<description>
Sets the given column's custom draw callback to [param callback] method on [param object].
The [param callback] should accept two arguments: the [TreeItem] that is drawn and its position and size as a [Rect2].
+ [i]Deprecated.[/i] Use [method TreeItem.set_custom_draw_callback] instead.
+ </description>
+ </method>
+ <method name="set_custom_draw_callback">
+ <return type="void" />
+ <param index="0" name="column" type="int" />
+ <param index="1" name="callback" type="Callable" />
+ <description>
+ Sets the given column's custom draw callback. Use an empty [Callable] ([code skip-lint]Callable()[/code]) to clear the custom callback.
+ The [param callback] should accept two arguments: the [TreeItem] that is drawn and its position and size as a [Rect2].
</description>
</method>
<method name="set_custom_font">