You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-06 12:20:30 +00:00
Add @export_tool_button annotation for easily creating inspector buttons
Co-authored-by: jordi <creptthrust@gmail.com> Co-authored-by: K. S. Ernest (iFire) Lee <ernest.lee@chibifire.com> Co-authored-by: Mack <86566939+Macksaur@users.noreply.github.com>
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
@tool
|
||||
class_name ExportVariableTest
|
||||
extends Node
|
||||
|
||||
@@ -47,6 +48,10 @@ const PreloadedUnnamedClass = preload("./export_variable_unnamed.notest.gd")
|
||||
@export_custom(PROPERTY_HINT_ENUM, "A,B,C") var test_export_custom_weak_int = 5
|
||||
@export_custom(PROPERTY_HINT_ENUM, "A,B,C") var test_export_custom_hard_int: int = 6
|
||||
|
||||
# `@export_tool_button`.
|
||||
@export_tool_button("Click me!") var test_tool_button_1: Callable
|
||||
@export_tool_button("Click me!", "ColorRect") var test_tool_button_2: Callable
|
||||
|
||||
func test():
|
||||
for property in get_property_list():
|
||||
if str(property.name).begins_with("test_"):
|
||||
|
||||
Reference in New Issue
Block a user