summaryrefslogtreecommitdiff
path: root/editor/plugins
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2017-06-30 21:30:17 -0300
committerJuan Linietsky <reduzio@gmail.com>2017-06-30 21:35:05 -0300
commit2a3e00c8c7e6f997b12864755a3df3b9bd3cca05 (patch)
tree807a72e686f76fcf44ecd5fb2e6834545d98b38f /editor/plugins
parente2e73ec906d0671c870ff64eefd15dfc86abaaec (diff)
-Many fixes to VisualScript, fixed property names, etc.
-Added ability to set/get a field in GetSet, as well as assignment ops -Added a Select node -Fixed update bugs related to variable list and exported properties, closes #9458
Diffstat (limited to 'editor/plugins')
-rw-r--r--editor/plugins/script_editor_plugin.cpp13
-rw-r--r--editor/plugins/script_editor_plugin.h3
-rw-r--r--editor/plugins/script_text_editor.cpp4
-rw-r--r--editor/plugins/script_text_editor.h2
4 files changed, 15 insertions, 7 deletions
diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp
index 0024870665..a7a3242ad9 100644
--- a/editor/plugins/script_editor_plugin.cpp
+++ b/editor/plugins/script_editor_plugin.cpp
@@ -509,9 +509,8 @@ void ScriptEditor::_close_tab(int p_idx, bool p_save) {
if (p_save) {
apply_scripts();
}
- if (current->get_edit_menu()) {
- memdelete(current->get_edit_menu());
- }
+ current->clear_edit_menu();
+
} else {
EditorHelp *help = tab_container->get_child(selected)->cast_to<EditorHelp>();
_add_recent_script(help->get_class());
@@ -2180,13 +2179,15 @@ ScriptEditor::ScriptEditor(EditorNode *p_editor) {
script_list = memnew(ItemList);
list_split->add_child(script_list);
- script_list->set_custom_minimum_size(Size2(0, 0));
+ script_list->set_custom_minimum_size(Size2(150 * EDSCALE, 100)); //need to give a bit of limit to avoid it from disappearing
+ script_list->set_v_size_flags(SIZE_EXPAND_FILL);
script_split->set_split_offset(140);
- list_split->set_split_offset(500);
+ //list_split->set_split_offset(500);
members_overview = memnew(ItemList);
list_split->add_child(members_overview);
- members_overview->set_custom_minimum_size(Size2(0, 0));
+ members_overview->set_custom_minimum_size(Size2(0, 100)); //need to give a bit of limit to avoid it from disappearing
+ members_overview->set_v_size_flags(SIZE_EXPAND_FILL);
tab_container = memnew(TabContainer);
tab_container->add_style_override("panel", p_editor->get_gui_base()->get_stylebox("ScriptPanel", "EditorStyles"));
diff --git a/editor/plugins/script_editor_plugin.h b/editor/plugins/script_editor_plugin.h
index 3b444c0883..da8248a1a7 100644
--- a/editor/plugins/script_editor_plugin.h
+++ b/editor/plugins/script_editor_plugin.h
@@ -106,6 +106,7 @@ public:
virtual void set_tooltip_request_func(String p_method, Object *p_obj) = 0;
virtual Control *get_edit_menu() = 0;
+ virtual void clear_edit_menu() = 0;
ScriptEditorBase() {}
};
@@ -363,6 +364,8 @@ public:
bool can_take_away_focus() const;
+ VSplitContainer *get_left_list_split() { return list_split; }
+
ScriptEditorDebugger *get_debugger() { return debugger; }
void set_live_auto_reload_running_scripts(bool p_enabled);
diff --git a/editor/plugins/script_text_editor.cpp b/editor/plugins/script_text_editor.cpp
index 60fd9d8e30..83741c7fb8 100644
--- a/editor/plugins/script_text_editor.cpp
+++ b/editor/plugins/script_text_editor.cpp
@@ -1093,6 +1093,10 @@ Control *ScriptTextEditor::get_edit_menu() {
return edit_hb;
}
+void ScriptTextEditor::clear_edit_menu() {
+ memdelete(edit_hb);
+}
+
void ScriptTextEditor::reload(bool p_soft) {
TextEdit *te = code_editor->get_text_edit();
diff --git a/editor/plugins/script_text_editor.h b/editor/plugins/script_text_editor.h
index ba40645161..e55847832f 100644
--- a/editor/plugins/script_text_editor.h
+++ b/editor/plugins/script_text_editor.h
@@ -156,7 +156,7 @@ public:
virtual void set_debugger_active(bool p_active);
Control *get_edit_menu();
-
+ virtual void clear_edit_menu();
static void register_editor();
ScriptTextEditor();