From e218a13a64d417505ba8ca0abb79dddfb943f2c7 Mon Sep 17 00:00:00 2001 From: Ignacio Etcheverry Date: Tue, 24 Oct 2017 01:54:47 +0200 Subject: Add ScriptLanguage::supports_builtin_mode and improve ScriptCreateDialog - Make ScriptCreateDialog disable the built-in script checked button if the language does not support it. - ScriptLanguage's get_template and make_template now receive the script path as class name if the the script language does not have named classes. --- modules/gdnative/pluginscript/pluginscript_language.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'modules/gdnative/pluginscript/pluginscript_language.cpp') diff --git a/modules/gdnative/pluginscript/pluginscript_language.cpp b/modules/gdnative/pluginscript/pluginscript_language.cpp index d4b86ae5b4..40feb5ae43 100644 --- a/modules/gdnative/pluginscript/pluginscript_language.cpp +++ b/modules/gdnative/pluginscript/pluginscript_language.cpp @@ -133,6 +133,10 @@ bool PluginScriptLanguage::has_named_classes() const { return _desc.has_named_classes; } +bool PluginScriptLanguage::supports_builtin_mode() const { + return _desc.supports_builtin_mode; +} + int PluginScriptLanguage::find_function(const String &p_function, const String &p_code) const { if (_desc.find_function) { return _desc.find_function(_data, (godot_string *)&p_function, (godot_string *)&p_code); -- cgit v1.2.3