diff options
author | Juan Linietsky <reduzio@gmail.com> | 2015-11-18 09:20:46 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2015-11-18 09:20:46 -0300 |
commit | b08312b30c5fa47bffc2d21d4cb57520b822bf45 (patch) | |
tree | b094db61ac28b92e5f915b5d971e4c145185c6d6 /tools/editor/plugins | |
parent | 18e014a193840141911789aacf57b28a2e001724 (diff) |
-Fixed default theme a little
-Added option to group help pages, fixes #2805
Diffstat (limited to 'tools/editor/plugins')
-rw-r--r-- | tools/editor/plugins/script_editor_plugin.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tools/editor/plugins/script_editor_plugin.cpp b/tools/editor/plugins/script_editor_plugin.cpp index 0de9adebc8..65ed420a51 100644 --- a/tools/editor/plugins/script_editor_plugin.cpp +++ b/tools/editor/plugins/script_editor_plugin.cpp @@ -1654,11 +1654,12 @@ struct _ScriptEditorItemData { int index; String tooltip; bool used; + int category; bool operator<(const _ScriptEditorItemData& id) const { - return name.nocasecmp_to(id.name)<0; + return category==id.category?name.nocasecmp_to(id.name)<0:category<id.category; } }; @@ -1708,6 +1709,7 @@ void ScriptEditor::_update_script_names() { } script_list->clear(); + bool split_script_help = EditorSettings::get_singleton()->get("text_editor/group_help_pages"); Vector<_ScriptEditorItemData> sedata; @@ -1727,6 +1729,7 @@ void ScriptEditor::_update_script_names() { sd.tooltip=tooltip; sd.index=i; sd.used=used.has(ste->get_edited_script()); + sd.category=0; sedata.push_back(sd); } @@ -1744,11 +1747,11 @@ void ScriptEditor::_update_script_names() { sd.tooltip=tooltip; sd.index=i; sd.used=false; + sd.category=split_script_help?1:0; sedata.push_back(sd); } - } sedata.sort(); @@ -2570,6 +2573,7 @@ ScriptEditorPlugin::ScriptEditorPlugin(EditorNode *p_node) { EDITOR_DEF("text_editor/script_temperature_history_size",15); EDITOR_DEF("text_editor/script_temperature_hot_color",Color(1,0,0,0.3)); EDITOR_DEF("text_editor/script_temperature_cold_color",Color(0,0,1,0.3)); + EDITOR_DEF("text_editor/group_help_pages",false); EditorSettings::get_singleton()->add_property_hint(PropertyInfo(Variant::STRING,"external_editor/exec_path",PROPERTY_HINT_GLOBAL_FILE)); EDITOR_DEF("external_editor/exec_flags",""); |