Skip to content

Commit 9086e94

Browse files
committed
Document @export_tool_button icon parameter in GDScript exports
1 parent 9924a69 commit 9086e94

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

tutorials/scripting/gdscript/gdscript_exports.rst

+12-1
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,18 @@ for a list of parameters and their allowed values.
494494
If you need to create a clickable inspector button, you can use ``@export_tool_button``.
495495
This exports a ``Callable`` property as a clickable button. When the button is pressed, the callable is called.
496496

497-
Export a button with label ``"Hello"`` and icon ``"Callable"``. When you press it, it will print ``"Hello world!"``.
497+
You can specify a custom icon name, which must match one of the icon
498+
file names from the
499+
`editor/icons <https://github.com/godotengine/godot/tree/master/editor/icons>`__
500+
folder of the Godot source repository (case-sensitive). For example, if you wish
501+
to use ``Node2D.svg`` from that folder, you must specify ``"Node2D"`` as the
502+
second parameter of ``@export_tool_button``. It is not currently possible
503+
to use custom icons from the project folder; only built-in editor icons
504+
can be used.
505+
506+
This exports a button with label ``"Hello"`` and icon ``"Callable"`` (which is the
507+
default if no icon is specified). When you press it, it will print ``"Hello
508+
world!"``.
498509

499510
::
500511

0 commit comments

Comments
 (0)