From 95cf6afb4797ba81ee9783583f456e06f43a58ab Mon Sep 17 00:00:00 2001 From: Emmanouil Papadeas Date: Thu, 14 Jul 2022 18:22:19 +0300 Subject: [PATCH] Added a `get_global()` method in ExtensionsAPI In case an extension needs to use properties that can only be found in Global, such as a setting in the Preferences. --- src/Autoload/ExtensionsAPI.gd | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Autoload/ExtensionsAPI.gd b/src/Autoload/ExtensionsAPI.gd index 73b52063c..9af9e0ac2 100644 --- a/src/Autoload/ExtensionsAPI.gd +++ b/src/Autoload/ExtensionsAPI.gd @@ -12,6 +12,10 @@ func dialog_open(open: bool) -> void: Global.dialog_open(open) +func get_global() -> Global: + return Global + + func get_extensions_node() -> Node: return Global.control.get_node("Extensions")