File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed
tutorials/scripting/gdscript Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -507,7 +507,21 @@ for a list of parameters and their allowed values.
507507If you need to create a clickable inspector button, you can use ``@export_tool_button ``.
508508This exports a ``Callable `` property as a clickable button. When the button is pressed, the callable is called.
509509
510- Export a button with label ``"Hello" `` and icon ``"Callable" ``. When you press it, it will print ``"Hello world!" ``.
510+ You can specify a custom icon name, which must match one of the icon
511+ file names from the
512+ `editor/icons <https://github.com/godotengine/godot/tree/master/editor/icons >`__
513+ folder of the Godot source repository (case-sensitive).
514+ You can also browse the editor icons using the
515+ `Godot editor icons <https://godot-editor-icons.github.io/ >`__ website.
516+
517+ For example, if you wish to use ``Node2D.svg `` from that folder, you must
518+ specify ``"Node2D" `` as the second parameter of ``@export_tool_button ``. It is
519+ not currently possible to use custom icons from the project folder; only
520+ built-in editor icons can be used.
521+
522+ This exports a button with label ``"Hello" `` and icon ``"Callable" `` (which is the
523+ default if no icon is specified). When you press it, it will print ``"Hello
524+ world!" ``.
511525
512526::
513527
You can’t perform that action at this time.
0 commit comments