diff options
| author | Juan Linietsky | 2016-06-30 10:41:08 -0300 |
|---|---|---|
| committer | Juan Linietsky | 2016-06-30 10:41:08 -0300 |
| commit | e8a2c767d2c151b7960cc8a977b09664e10824e1 (patch) | |
| tree | f42fcb9edac69e94b112a1536e930dfe10b615b7 /tools | |
| parent | e49b73e93a91ebd76671dfedd213ddf5b0ae7b56 (diff) | |
| parent | d81b635957450a85efbf25066f9ee517ef10ec3f (diff) | |
| download | godot-e8a2c767d2c151b7960cc8a977b09664e10824e1.tar.gz godot-e8a2c767d2c151b7960cc8a977b09664e10824e1.tar.zst godot-e8a2c767d2c151b7960cc8a977b09664e10824e1.zip | |
Merge branch 'master' of https://github.com/godotengine/godot
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/editor/plugins/script_editor_plugin.cpp | 22 | ||||
| -rw-r--r-- | tools/editor/plugins/script_editor_plugin.h | 2 | ||||
| -rw-r--r-- | tools/editor/plugins/tile_map_editor_plugin.cpp | 2 | ||||
| -rw-r--r-- | tools/editor/project_manager.cpp | 3 | ||||
| -rw-r--r-- | tools/editor/scenes_dock.cpp | 3 |
5 files changed, 26 insertions, 6 deletions
diff --git a/tools/editor/plugins/script_editor_plugin.cpp b/tools/editor/plugins/script_editor_plugin.cpp index 10e4fc847..ee83b6b03 100644 --- a/tools/editor/plugins/script_editor_plugin.cpp +++ b/tools/editor/plugins/script_editor_plugin.cpp @@ -585,7 +585,6 @@ void ScriptTextEditor::_code_complete_script(const String& p_code, List<String>* Error err = script->get_language()->complete_code(p_code,script->get_path().get_base_dir(),base,r_options,hint); if (hint!="") { get_text_edit()->set_code_hint(hint); - print_line("hint: "+hint.replace(String::chr(0xFFFF),"|")); } } @@ -2316,6 +2315,22 @@ void ScriptEditor::_script_split_dragged(float) { EditorNode::get_singleton()->save_layout(); } +void ScriptEditor::_unhandled_input(const InputEvent& p_event) { + if (p_event.key.pressed || !is_visible()) return; + if (ED_IS_SHORTCUT("script_editor/next_script", p_event)) { + int next_tab = script_list->get_current() + 1; + next_tab %= script_list->get_item_count(); + _go_to_tab(script_list->get_item_metadata(next_tab)); + _update_script_names(); + } + if (ED_IS_SHORTCUT("script_editor/prev_script", p_event)) { + int next_tab = script_list->get_current() - 1; + next_tab = next_tab >= 0 ? next_tab : script_list->get_item_count() - 1; + _go_to_tab(script_list->get_item_metadata(next_tab)); + _update_script_names(); + } +} + void ScriptEditor::set_window_layout(Ref<ConfigFile> p_layout) { if (!bool(EDITOR_DEF("text_editor/restore_scripts_on_load",true))) { @@ -2598,6 +2613,7 @@ void ScriptEditor::_bind_methods() { ObjectTypeDB::bind_method("_history_forward",&ScriptEditor::_history_forward); ObjectTypeDB::bind_method("_history_back",&ScriptEditor::_history_back); ObjectTypeDB::bind_method("_live_auto_reload_running_scripts",&ScriptEditor::_live_auto_reload_running_scripts); + ObjectTypeDB::bind_method("_unhandled_input",&ScriptEditor::_unhandled_input); } @@ -2631,6 +2647,10 @@ ScriptEditor::ScriptEditor(EditorNode *p_editor) { tab_container->set_h_size_flags(SIZE_EXPAND_FILL); + ED_SHORTCUT("script_editor/next_script", TTR("Next script"), KEY_MASK_CMD | KEY_MASK_SHIFT | KEY_GREATER); + ED_SHORTCUT("script_editor/prev_script", TTR("Previous script"), KEY_MASK_CMD | KEY_LESS); + set_process_unhandled_input(true); + file_menu = memnew( MenuButton ); menu_hb->add_child(file_menu); file_menu->set_text(TTR("File")); diff --git a/tools/editor/plugins/script_editor_plugin.h b/tools/editor/plugins/script_editor_plugin.h index 0636190a4..85412087b 100644 --- a/tools/editor/plugins/script_editor_plugin.h +++ b/tools/editor/plugins/script_editor_plugin.h @@ -279,6 +279,8 @@ class ScriptEditor : public VBoxContainer { void _script_split_dragged(float); + void _unhandled_input(const InputEvent& p_event); + void _history_forward(); void _history_back(); diff --git a/tools/editor/plugins/tile_map_editor_plugin.cpp b/tools/editor/plugins/tile_map_editor_plugin.cpp index d5f85d333..9d27ac8aa 100644 --- a/tools/editor/plugins/tile_map_editor_plugin.cpp +++ b/tools/editor/plugins/tile_map_editor_plugin.cpp @@ -223,7 +223,7 @@ void TileMapEditor::_update_palette() { String name; if (tileset->tile_get_name(E->get())!="") { - name = tileset->tile_get_name(E->get()); + name = itos(E->get())+" - "+tileset->tile_get_name(E->get()); } else { name = "#"+itos(E->get()); } diff --git a/tools/editor/project_manager.cpp b/tools/editor/project_manager.cpp index d8814fd50..dafec397c 100644 --- a/tools/editor/project_manager.cpp +++ b/tools/editor/project_manager.cpp @@ -871,9 +871,6 @@ ProjectManager::ProjectManager() { HBoxContainer *top_hb = memnew( HBoxContainer); vb->add_child(top_hb); - TextureFrame *logo = memnew( TextureFrame ); - logo->set_texture(theme->get_icon("LogoSmall","EditorIcons")); - //top_hb->add_child( logo ); CenterContainer *ccl = memnew( CenterContainer ); Label *l = memnew( Label ); l->set_text(_MKSTR(VERSION_NAME)+String(" - ")+TTR("Project Manager")); diff --git a/tools/editor/scenes_dock.cpp b/tools/editor/scenes_dock.cpp index cbd7df9d1..0df4dfacc 100644 --- a/tools/editor/scenes_dock.cpp +++ b/tools/editor/scenes_dock.cpp @@ -164,12 +164,14 @@ void ScenesDock::_notification(int p_what) { if (split_mode) { file_list_vb->hide(); + tree->set_custom_minimum_size(Size2(0,0)); tree->set_v_size_flags(SIZE_EXPAND_FILL); button_back->show(); } else { tree->show(); file_list_vb->show(); + tree->set_custom_minimum_size(Size2(0,200)*EDSCALE); tree->set_v_size_flags(SIZE_FILL); button_back->hide(); if (!EditorFileSystem::get_singleton()->is_scanning()) { @@ -1702,7 +1704,6 @@ ScenesDock::ScenesDock(EditorNode *p_editor) { tree->set_hide_root(true); split_box->add_child(tree); - tree->set_custom_minimum_size(Size2(0,200)*EDSCALE); tree->set_drag_forwarding(this); |
