Added fun button
This commit is contained in:
@@ -14,10 +14,16 @@ func _run():
|
||||
#print(is_instance_of(selected, EditorPropertyText))
|
||||
#print(_find_recursive(selected,"EditorPropertyMultilineText")[0].get_child(0).get_child(0).get_class())
|
||||
#print(_find_recursive(selected,"EditorPropertyText")[0].get_child(0).get_child(0).get_class())
|
||||
#testButton = Button.new()
|
||||
#testButton.text = "Test Button"
|
||||
testButton = Button.new()
|
||||
testButton.text = "Remove this button"
|
||||
#testButton.global_position = Vector2(1904.0, 305.0)
|
||||
#EditorInterface.get_base_control().add_child(testButton)
|
||||
testButton.pressed.connect(
|
||||
func():
|
||||
testButton.get_parent().remove_child(testButton)
|
||||
testButton.queue_free()
|
||||
)
|
||||
EditorInterface.get_base_control().add_child(testButton)
|
||||
|
||||
pass
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user