| 
									
										
										
										
											2016-06-18 14:46:12 +02:00
										 |  |  | /*************************************************************************/ | 
					
						
							|  |  |  | /*  editor_plugin_settings.cpp                                           */ | 
					
						
							|  |  |  | /*************************************************************************/ | 
					
						
							|  |  |  | /*                       This file is part of:                           */ | 
					
						
							|  |  |  | /*                           GODOT ENGINE                                */ | 
					
						
							| 
									
										
										
										
											2017-08-27 14:16:55 +02:00
										 |  |  | /*                      https://godotengine.org                          */ | 
					
						
							| 
									
										
										
										
											2016-06-18 14:46:12 +02:00
										 |  |  | /*************************************************************************/ | 
					
						
							| 
									
										
										
										
											2022-01-13 09:45:09 +01:00
										 |  |  | /* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur.                 */ | 
					
						
							|  |  |  | /* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md).   */ | 
					
						
							| 
									
										
										
										
											2016-06-18 14:46:12 +02:00
										 |  |  | /*                                                                       */ | 
					
						
							|  |  |  | /* Permission is hereby granted, free of charge, to any person obtaining */ | 
					
						
							|  |  |  | /* a copy of this software and associated documentation files (the       */ | 
					
						
							|  |  |  | /* "Software"), to deal in the Software without restriction, including   */ | 
					
						
							|  |  |  | /* without limitation the rights to use, copy, modify, merge, publish,   */ | 
					
						
							|  |  |  | /* distribute, sublicense, and/or sell copies of the Software, and to    */ | 
					
						
							|  |  |  | /* permit persons to whom the Software is furnished to do so, subject to */ | 
					
						
							|  |  |  | /* the following conditions:                                             */ | 
					
						
							|  |  |  | /*                                                                       */ | 
					
						
							|  |  |  | /* The above copyright notice and this permission notice shall be        */ | 
					
						
							|  |  |  | /* included in all copies or substantial portions of the Software.       */ | 
					
						
							|  |  |  | /*                                                                       */ | 
					
						
							|  |  |  | /* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,       */ | 
					
						
							|  |  |  | /* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF    */ | 
					
						
							|  |  |  | /* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/ | 
					
						
							|  |  |  | /* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY  */ | 
					
						
							|  |  |  | /* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,  */ | 
					
						
							|  |  |  | /* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE     */ | 
					
						
							|  |  |  | /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                */ | 
					
						
							|  |  |  | /*************************************************************************/ | 
					
						
							| 
									
										
										
										
											2018-01-05 00:50:27 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-02-27 23:10:44 -03:00
										 |  |  | #include "editor_plugin_settings.h"
 | 
					
						
							| 
									
										
										
										
											2017-01-16 08:04:19 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-09-11 18:13:45 +02:00
										 |  |  | #include "core/io/config_file.h"
 | 
					
						
							|  |  |  | #include "core/os/file_access.h"
 | 
					
						
							|  |  |  | #include "core/os/main_loop.h"
 | 
					
						
							|  |  |  | #include "core/project_settings.h"
 | 
					
						
							| 
									
										
										
										
											2017-03-05 16:44:50 +01:00
										 |  |  | #include "editor_node.h"
 | 
					
						
							| 
									
										
										
										
											2019-12-24 15:17:23 +08:00
										 |  |  | #include "editor_scale.h"
 | 
					
						
							| 
									
										
										
										
											2017-03-05 16:44:50 +01:00
										 |  |  | #include "scene/gui/margin_container.h"
 | 
					
						
							| 
									
										
										
										
											2016-02-27 23:10:44 -03:00
										 |  |  | 
 | 
					
						
							|  |  |  | void EditorPluginSettings::_notification(int p_what) { | 
					
						
							| 
									
										
										
										
											2017-03-05 16:44:50 +01:00
										 |  |  | 	if (p_what == MainLoop::NOTIFICATION_WM_FOCUS_IN) { | 
					
						
							| 
									
										
										
										
											2016-02-27 23:10:44 -03:00
										 |  |  | 		update_plugins(); | 
					
						
							| 
									
										
										
										
											2018-07-19 10:34:22 -05:00
										 |  |  | 	} else if (p_what == Node::NOTIFICATION_READY) { | 
					
						
							|  |  |  | 		plugin_config_dialog->connect("plugin_ready", EditorNode::get_singleton(), "_on_plugin_ready"); | 
					
						
							|  |  |  | 		plugin_list->connect("button_pressed", this, "_cell_button_pressed"); | 
					
						
							| 
									
										
										
										
											2016-02-27 23:10:44 -03:00
										 |  |  | 	} | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | void EditorPluginSettings::update_plugins() { | 
					
						
							|  |  |  | 	plugin_list->clear(); | 
					
						
							| 
									
										
										
										
											2017-03-05 16:44:50 +01:00
										 |  |  | 	updating = true; | 
					
						
							| 
									
										
										
										
											2016-02-27 23:10:44 -03:00
										 |  |  | 	TreeItem *root = plugin_list->create_item(); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-01-19 18:41:12 +02:00
										 |  |  | 	Vector<String> plugins = _get_plugins("res://addons"); | 
					
						
							| 
									
										
										
										
											2016-02-27 23:10:44 -03:00
										 |  |  | 	plugins.sort(); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-03-05 16:44:50 +01:00
										 |  |  | 	for (int i = 0; i < plugins.size(); i++) { | 
					
						
							| 
									
										
										
										
											2016-02-27 23:10:44 -03:00
										 |  |  | 		Ref<ConfigFile> cf; | 
					
						
							|  |  |  | 		cf.instance(); | 
					
						
							| 
									
										
										
										
											2021-01-19 18:41:12 +02:00
										 |  |  | 		const String path = plugins[i]; | 
					
						
							| 
									
										
										
										
											2016-02-27 23:10:44 -03:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-02-12 21:10:08 +01:00
										 |  |  | 		Error err2 = cf->load(path); | 
					
						
							| 
									
										
										
										
											2016-02-27 23:10:44 -03:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-02-12 21:10:08 +01:00
										 |  |  | 		if (err2 != OK) { | 
					
						
							| 
									
										
										
										
											2021-06-18 12:26:58 +01:00
										 |  |  | 			WARN_PRINT("Can't load plugin config: " + path); | 
					
						
							| 
									
										
										
										
											2016-02-27 23:10:44 -03:00
										 |  |  | 		} else { | 
					
						
							| 
									
										
										
										
											2019-08-30 20:56:31 +02:00
										 |  |  | 			bool key_missing = false; | 
					
						
							| 
									
										
										
										
											2016-02-27 23:10:44 -03:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-08-30 20:56:31 +02:00
										 |  |  | 			if (!cf->has_section_key("plugin", "name")) { | 
					
						
							| 
									
										
										
										
											2021-06-18 12:26:58 +01:00
										 |  |  | 				WARN_PRINT("Plugin config misses \"plugin/name\" key: " + path); | 
					
						
							| 
									
										
										
										
											2019-08-30 20:56:31 +02:00
										 |  |  | 				key_missing = true; | 
					
						
							|  |  |  | 			} | 
					
						
							|  |  |  | 			if (!cf->has_section_key("plugin", "author")) { | 
					
						
							| 
									
										
										
										
											2021-06-18 12:26:58 +01:00
										 |  |  | 				WARN_PRINT("Plugin config misses \"plugin/author\" key: " + path); | 
					
						
							| 
									
										
										
										
											2019-08-30 20:56:31 +02:00
										 |  |  | 				key_missing = true; | 
					
						
							|  |  |  | 			} | 
					
						
							|  |  |  | 			if (!cf->has_section_key("plugin", "version")) { | 
					
						
							| 
									
										
										
										
											2021-06-18 12:26:58 +01:00
										 |  |  | 				WARN_PRINT("Plugin config misses \"plugin/version\" key: " + path); | 
					
						
							| 
									
										
										
										
											2019-08-30 20:56:31 +02:00
										 |  |  | 				key_missing = true; | 
					
						
							|  |  |  | 			} | 
					
						
							|  |  |  | 			if (!cf->has_section_key("plugin", "description")) { | 
					
						
							| 
									
										
										
										
											2021-06-18 12:26:58 +01:00
										 |  |  | 				WARN_PRINT("Plugin config misses \"plugin/description\" key: " + path); | 
					
						
							| 
									
										
										
										
											2019-08-30 20:56:31 +02:00
										 |  |  | 				key_missing = true; | 
					
						
							|  |  |  | 			} | 
					
						
							|  |  |  | 			if (!cf->has_section_key("plugin", "script")) { | 
					
						
							| 
									
										
										
										
											2021-06-18 12:26:58 +01:00
										 |  |  | 				WARN_PRINT("Plugin config misses \"plugin/script\" key: " + path); | 
					
						
							| 
									
										
										
										
											2019-08-30 20:56:31 +02:00
										 |  |  | 				key_missing = true; | 
					
						
							|  |  |  | 			} | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 			if (!key_missing) { | 
					
						
							|  |  |  | 				String name = cf->get_value("plugin", "name"); | 
					
						
							|  |  |  | 				String author = cf->get_value("plugin", "author"); | 
					
						
							|  |  |  | 				String version = cf->get_value("plugin", "version"); | 
					
						
							|  |  |  | 				String description = cf->get_value("plugin", "description"); | 
					
						
							|  |  |  | 				String script = cf->get_value("plugin", "script"); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 				TreeItem *item = plugin_list->create_item(root); | 
					
						
							|  |  |  | 				item->set_text(0, name); | 
					
						
							|  |  |  | 				item->set_tooltip(0, TTR("Name:") + " " + name + "\n" + TTR("Path:") + " " + path + "\n" + TTR("Main Script:") + " " + script + "\n" + TTR("Description:") + " " + description); | 
					
						
							| 
									
										
										
										
											2021-01-19 18:41:12 +02:00
										 |  |  | 				item->set_metadata(0, path); | 
					
						
							| 
									
										
										
										
											2019-08-30 20:56:31 +02:00
										 |  |  | 				item->set_text(1, version); | 
					
						
							|  |  |  | 				item->set_metadata(1, script); | 
					
						
							|  |  |  | 				item->set_text(2, author); | 
					
						
							|  |  |  | 				item->set_metadata(2, description); | 
					
						
							| 
									
										
										
										
											2020-02-14 01:56:02 +09:00
										 |  |  | 				item->set_cell_mode(3, TreeItem::CELL_MODE_CHECK); | 
					
						
							|  |  |  | 				item->set_text(3, TTR("Enable")); | 
					
						
							| 
									
										
										
										
											2021-01-19 18:41:12 +02:00
										 |  |  | 				bool is_active = EditorNode::get_singleton()->is_addon_plugin_enabled(path); | 
					
						
							| 
									
										
										
										
											2020-02-14 01:56:02 +09:00
										 |  |  | 				item->set_checked(3, is_active); | 
					
						
							| 
									
										
										
										
											2019-08-30 20:56:31 +02:00
										 |  |  | 				item->set_editable(3, true); | 
					
						
							|  |  |  | 				item->add_button(4, get_icon("Edit", "EditorIcons"), BUTTON_PLUGIN_EDIT, false, TTR("Edit Plugin")); | 
					
						
							| 
									
										
										
										
											2016-02-27 23:10:44 -03:00
										 |  |  | 			} | 
					
						
							|  |  |  | 		} | 
					
						
							|  |  |  | 	} | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-03-05 16:44:50 +01:00
										 |  |  | 	updating = false; | 
					
						
							| 
									
										
										
										
											2016-02-27 23:10:44 -03:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | void EditorPluginSettings::_plugin_activity_changed() { | 
					
						
							| 
									
										
										
										
											2021-05-05 12:44:11 +02:00
										 |  |  | 	if (updating) { | 
					
						
							| 
									
										
										
										
											2016-02-27 23:10:44 -03:00
										 |  |  | 		return; | 
					
						
							| 
									
										
										
										
											2021-05-05 12:44:11 +02:00
										 |  |  | 	} | 
					
						
							| 
									
										
										
										
											2016-02-27 23:10:44 -03:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-03-05 16:44:50 +01:00
										 |  |  | 	TreeItem *ti = plugin_list->get_edited(); | 
					
						
							| 
									
										
										
										
											2016-02-27 23:10:44 -03:00
										 |  |  | 	ERR_FAIL_COND(!ti); | 
					
						
							| 
									
										
										
										
											2020-02-14 01:56:02 +09:00
										 |  |  | 	bool active = ti->is_checked(3); | 
					
						
							| 
									
										
										
										
											2016-02-27 23:10:44 -03:00
										 |  |  | 	String name = ti->get_metadata(0); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-06-11 02:59:53 +02:00
										 |  |  | 	EditorNode::get_singleton()->set_addon_plugin_enabled(name, active, true); | 
					
						
							| 
									
										
										
										
											2016-02-27 23:10:44 -03:00
										 |  |  | 
 | 
					
						
							|  |  |  | 	bool is_active = EditorNode::get_singleton()->is_addon_plugin_enabled(name); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-03-05 16:44:50 +01:00
										 |  |  | 	if (is_active != active) { | 
					
						
							|  |  |  | 		updating = true; | 
					
						
							| 
									
										
										
										
											2020-02-14 01:56:02 +09:00
										 |  |  | 		ti->set_checked(3, is_active); | 
					
						
							| 
									
										
										
										
											2017-03-05 16:44:50 +01:00
										 |  |  | 		updating = false; | 
					
						
							| 
									
										
										
										
											2016-02-27 23:10:44 -03:00
										 |  |  | 	} | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-07-19 10:34:22 -05:00
										 |  |  | void EditorPluginSettings::_create_clicked() { | 
					
						
							|  |  |  | 	plugin_config_dialog->config(""); | 
					
						
							|  |  |  | 	plugin_config_dialog->popup_centered(); | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | void EditorPluginSettings::_cell_button_pressed(Object *p_item, int p_column, int p_id) { | 
					
						
							|  |  |  | 	TreeItem *item = Object::cast_to<TreeItem>(p_item); | 
					
						
							| 
									
										
										
										
											2021-05-05 12:44:11 +02:00
										 |  |  | 	if (!item) { | 
					
						
							| 
									
										
										
										
											2018-07-19 10:34:22 -05:00
										 |  |  | 		return; | 
					
						
							| 
									
										
										
										
											2021-05-05 12:44:11 +02:00
										 |  |  | 	} | 
					
						
							| 
									
										
										
										
											2018-07-19 10:34:22 -05:00
										 |  |  | 	if (p_id == BUTTON_PLUGIN_EDIT) { | 
					
						
							|  |  |  | 		if (p_column == 4) { | 
					
						
							|  |  |  | 			String dir = item->get_metadata(0); | 
					
						
							| 
									
										
										
										
											2021-01-19 18:41:12 +02:00
										 |  |  | 			plugin_config_dialog->config(dir); | 
					
						
							| 
									
										
										
										
											2018-07-19 10:34:22 -05:00
										 |  |  | 			plugin_config_dialog->popup_centered(); | 
					
						
							|  |  |  | 		} | 
					
						
							|  |  |  | 	} | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-01-19 18:41:12 +02:00
										 |  |  | Vector<String> EditorPluginSettings::_get_plugins(const String &p_dir) { | 
					
						
							|  |  |  | 	DirAccessRef da = DirAccess::create(DirAccess::ACCESS_RESOURCES); | 
					
						
							|  |  |  | 	Error err = da->change_dir(p_dir); | 
					
						
							|  |  |  | 	if (err != OK) { | 
					
						
							|  |  |  | 		return Vector<String>(); | 
					
						
							|  |  |  | 	} | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	Vector<String> plugins; | 
					
						
							|  |  |  | 	da->list_dir_begin(); | 
					
						
							|  |  |  | 	for (String path = da->get_next(); path != String(); path = da->get_next()) { | 
					
						
							|  |  |  | 		if (path[0] == '.' || !da->current_is_dir()) { | 
					
						
							|  |  |  | 			continue; | 
					
						
							|  |  |  | 		} | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 		const String full_path = p_dir.plus_file(path); | 
					
						
							|  |  |  | 		const String plugin_config = full_path.plus_file("plugin.cfg"); | 
					
						
							|  |  |  | 		if (FileAccess::exists(plugin_config)) { | 
					
						
							|  |  |  | 			plugins.push_back(plugin_config); | 
					
						
							|  |  |  | 		} else { | 
					
						
							|  |  |  | 			plugins.append_array(_get_plugins(full_path)); | 
					
						
							|  |  |  | 		} | 
					
						
							|  |  |  | 	} | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	da->list_dir_end(); | 
					
						
							|  |  |  | 	return plugins; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-02-27 23:10:44 -03:00
										 |  |  | void EditorPluginSettings::_bind_methods() { | 
					
						
							| 
									
										
										
										
											2017-03-05 16:44:50 +01:00
										 |  |  | 	ClassDB::bind_method("update_plugins", &EditorPluginSettings::update_plugins); | 
					
						
							| 
									
										
										
										
											2018-07-19 10:34:22 -05:00
										 |  |  | 	ClassDB::bind_method("_create_clicked", &EditorPluginSettings::_create_clicked); | 
					
						
							| 
									
										
										
										
											2017-03-05 16:44:50 +01:00
										 |  |  | 	ClassDB::bind_method("_plugin_activity_changed", &EditorPluginSettings::_plugin_activity_changed); | 
					
						
							| 
									
										
										
										
											2018-07-19 10:34:22 -05:00
										 |  |  | 	ClassDB::bind_method("_cell_button_pressed", &EditorPluginSettings::_cell_button_pressed); | 
					
						
							| 
									
										
										
										
											2016-02-27 23:10:44 -03:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | EditorPluginSettings::EditorPluginSettings() { | 
					
						
							| 
									
										
										
										
											2018-07-19 10:34:22 -05:00
										 |  |  | 	plugin_config_dialog = memnew(PluginConfigDialog); | 
					
						
							|  |  |  | 	plugin_config_dialog->config(""); | 
					
						
							|  |  |  | 	add_child(plugin_config_dialog); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-03-05 16:44:50 +01:00
										 |  |  | 	HBoxContainer *title_hb = memnew(HBoxContainer); | 
					
						
							|  |  |  | 	title_hb->add_child(memnew(Label(TTR("Installed Plugins:")))); | 
					
						
							| 
									
										
										
										
											2016-02-27 23:10:44 -03:00
										 |  |  | 	title_hb->add_spacer(); | 
					
						
							| 
									
										
										
										
											2018-07-19 10:34:22 -05:00
										 |  |  | 	create_plugin = memnew(Button(TTR("Create"))); | 
					
						
							|  |  |  | 	create_plugin->connect("pressed", this, "_create_clicked"); | 
					
						
							|  |  |  | 	title_hb->add_child(create_plugin); | 
					
						
							| 
									
										
										
										
											2017-03-05 16:44:50 +01:00
										 |  |  | 	update_list = memnew(Button(TTR("Update"))); | 
					
						
							|  |  |  | 	update_list->connect("pressed", this, "update_plugins"); | 
					
						
							| 
									
										
										
										
											2016-02-27 23:10:44 -03:00
										 |  |  | 	title_hb->add_child(update_list); | 
					
						
							|  |  |  | 	add_child(title_hb); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-03-05 16:44:50 +01:00
										 |  |  | 	plugin_list = memnew(Tree); | 
					
						
							| 
									
										
										
										
											2016-02-27 23:10:44 -03:00
										 |  |  | 	plugin_list->set_v_size_flags(SIZE_EXPAND_FILL); | 
					
						
							| 
									
										
										
										
											2018-07-19 10:34:22 -05:00
										 |  |  | 	plugin_list->set_columns(5); | 
					
						
							| 
									
										
										
										
											2016-02-27 23:10:44 -03:00
										 |  |  | 	plugin_list->set_column_titles_visible(true); | 
					
						
							| 
									
										
										
										
											2021-07-29 21:51:07 +08:00
										 |  |  | 	plugin_list->set_column_title(0, TTR("Name")); | 
					
						
							|  |  |  | 	plugin_list->set_column_title(1, TTR("Version")); | 
					
						
							|  |  |  | 	plugin_list->set_column_title(2, TTR("Author")); | 
					
						
							|  |  |  | 	plugin_list->set_column_title(3, TTR("Status")); | 
					
						
							|  |  |  | 	plugin_list->set_column_title(4, TTR("Edit")); | 
					
						
							| 
									
										
										
										
											2017-03-05 16:44:50 +01:00
										 |  |  | 	plugin_list->set_column_expand(0, true); | 
					
						
							|  |  |  | 	plugin_list->set_column_expand(1, false); | 
					
						
							|  |  |  | 	plugin_list->set_column_expand(2, false); | 
					
						
							|  |  |  | 	plugin_list->set_column_expand(3, false); | 
					
						
							| 
									
										
										
										
											2018-07-19 10:34:22 -05:00
										 |  |  | 	plugin_list->set_column_expand(4, false); | 
					
						
							| 
									
										
										
										
											2017-08-07 21:55:24 -05:00
										 |  |  | 	plugin_list->set_column_min_width(1, 100 * EDSCALE); | 
					
						
							|  |  |  | 	plugin_list->set_column_min_width(2, 250 * EDSCALE); | 
					
						
							|  |  |  | 	plugin_list->set_column_min_width(3, 80 * EDSCALE); | 
					
						
							| 
									
										
										
										
											2018-07-19 10:34:22 -05:00
										 |  |  | 	plugin_list->set_column_min_width(4, 40 * EDSCALE); | 
					
						
							| 
									
										
										
										
											2016-02-27 23:10:44 -03:00
										 |  |  | 	plugin_list->set_hide_root(true); | 
					
						
							| 
									
										
										
										
											2017-03-05 16:44:50 +01:00
										 |  |  | 	plugin_list->connect("item_edited", this, "_plugin_activity_changed"); | 
					
						
							| 
									
										
										
										
											2016-02-27 23:10:44 -03:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-08-07 21:55:24 -05:00
										 |  |  | 	VBoxContainer *mc = memnew(VBoxContainer); | 
					
						
							| 
									
										
										
										
											2016-02-27 23:10:44 -03:00
										 |  |  | 	mc->add_child(plugin_list); | 
					
						
							|  |  |  | 	mc->set_v_size_flags(SIZE_EXPAND_FILL); | 
					
						
							| 
									
										
										
										
											2017-08-07 21:55:24 -05:00
										 |  |  | 	mc->set_h_size_flags(SIZE_EXPAND_FILL); | 
					
						
							| 
									
										
										
										
											2016-02-27 23:10:44 -03:00
										 |  |  | 
 | 
					
						
							|  |  |  | 	add_child(mc); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-03-05 16:44:50 +01:00
										 |  |  | 	updating = false; | 
					
						
							| 
									
										
										
										
											2016-02-27 23:10:44 -03:00
										 |  |  | } |