From adbc85cabda0a01d6b65a888bc65c410183cf7e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Tue, 24 Nov 2015 19:27:47 +0100 Subject: Fix build of ogg and vorbis drivers Regression from ccd40f76e8975b679619eb3591eb56376e82a6b3 --- drivers/ogg/SCsub | 2 +- drivers/vorbis/SCsub | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/ogg/SCsub b/drivers/ogg/SCsub index c85d4404f3..11205f5135 100644 --- a/drivers/ogg/SCsub +++ b/drivers/ogg/SCsub @@ -6,5 +6,5 @@ ogg_sources = [ "ogg/framing.c", ] -if env['theora'] != "yes" or env['use_theoraplayer_binary'] != "yes": +#if env['theora'] != "yes" or env['use_theoraplayer_binary'] != "yes": env.drivers_sources+=ogg_sources diff --git a/drivers/vorbis/SCsub b/drivers/vorbis/SCsub index 4a16e80dfc..7b9ca6cc9b 100644 --- a/drivers/vorbis/SCsub +++ b/drivers/vorbis/SCsub @@ -34,5 +34,5 @@ sources_lib = [ env.drivers_sources += sources -if env['theora'] != "yes" or env['use_theoraplayer_binary'] != "yes": +#if env['theora'] != "yes" or env['use_theoraplayer_binary'] != "yes": env.drivers_sources += sources_lib -- cgit v1.2.3 From e4a2458d4ccb2e6fbbb14826725bec537d633fa2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Tue, 24 Nov 2015 20:05:14 +0100 Subject: Fix indent --- drivers/ogg/SCsub | 2 +- drivers/vorbis/SCsub | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/ogg/SCsub b/drivers/ogg/SCsub index 11205f5135..9bfb4a4703 100644 --- a/drivers/ogg/SCsub +++ b/drivers/ogg/SCsub @@ -7,4 +7,4 @@ ogg_sources = [ ] #if env['theora'] != "yes" or env['use_theoraplayer_binary'] != "yes": - env.drivers_sources+=ogg_sources +env.drivers_sources+=ogg_sources diff --git a/drivers/vorbis/SCsub b/drivers/vorbis/SCsub index 7b9ca6cc9b..5c789970f2 100644 --- a/drivers/vorbis/SCsub +++ b/drivers/vorbis/SCsub @@ -35,4 +35,4 @@ sources_lib = [ env.drivers_sources += sources #if env['theora'] != "yes" or env['use_theoraplayer_binary'] != "yes": - env.drivers_sources += sources_lib +env.drivers_sources += sources_lib -- cgit v1.2.3 From c591293718a3710f5d18a2d09a57974df38696cb Mon Sep 17 00:00:00 2001 From: neikeq Date: Tue, 24 Nov 2015 22:33:26 +0100 Subject: Remember last help search --- tools/editor/editor_help.cpp | 8 ++++++++ tools/editor/editor_help.h | 3 ++- tools/editor/plugins/script_editor_plugin.cpp | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/tools/editor/editor_help.cpp b/tools/editor/editor_help.cpp index 808199e175..8fd99cc25a 100644 --- a/tools/editor/editor_help.cpp +++ b/tools/editor/editor_help.cpp @@ -36,6 +36,14 @@ #include "os/keyboard.h" +void EditorHelpSearch::popup() { + popup_centered_ratio(0.6); + if (search_box->get_text()!="") { + search_box->select_all(); + _update_search(); + } + search_box->grab_focus(); +} void EditorHelpSearch::popup(const String& p_term) { diff --git a/tools/editor/editor_help.h b/tools/editor/editor_help.h index b5ee6eca6c..04ac4d35ff 100644 --- a/tools/editor/editor_help.h +++ b/tools/editor/editor_help.h @@ -68,7 +68,8 @@ protected: static void _bind_methods(); public: - void popup(const String& p_term=""); + void popup(); + void popup(const String& p_term); EditorHelpSearch(); }; diff --git a/tools/editor/plugins/script_editor_plugin.cpp b/tools/editor/plugins/script_editor_plugin.cpp index 65ed420a51..6413ca1269 100644 --- a/tools/editor/plugins/script_editor_plugin.cpp +++ b/tools/editor/plugins/script_editor_plugin.cpp @@ -881,7 +881,7 @@ void ScriptEditor::_menu_option(int p_option) { } break; case SEARCH_HELP: { - help_search_dialog->popup("current"); + help_search_dialog->popup(); } break; case SEARCH_CLASSES: { -- cgit v1.2.3 From 660e831e3669f3dff120233549d963b49bf4d76b Mon Sep 17 00:00:00 2001 From: neikeq Date: Tue, 24 Nov 2015 22:59:44 +0100 Subject: Fix Class Search dialog not showing up --- tools/editor/plugins/script_editor_plugin.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/tools/editor/plugins/script_editor_plugin.cpp b/tools/editor/plugins/script_editor_plugin.cpp index 65ed420a51..34d0ec2a4b 100644 --- a/tools/editor/plugins/script_editor_plugin.cpp +++ b/tools/editor/plugins/script_editor_plugin.cpp @@ -885,14 +885,13 @@ void ScriptEditor::_menu_option(int p_option) { } break; case SEARCH_CLASSES: { - if (tab_container->get_tab_count()==0) - break; - String current; - EditorHelp *eh = tab_container->get_child( tab_container->get_current_tab() )->cast_to(); - if (eh) { - current=eh->get_class_name(); + if (tab_container->get_tab_count()>0) { + EditorHelp *eh = tab_container->get_child( tab_container->get_current_tab() )->cast_to(); + if (eh) { + current=eh->get_class_name(); + } } help_index->popup_centered_ratio(0.6); -- cgit v1.2.3 From bfe8df27bc2f2777c5e6636827e5430f95c90562 Mon Sep 17 00:00:00 2001 From: neikeq Date: Wed, 25 Nov 2015 00:07:32 +0100 Subject: Fix switching between 2D/3D/Script --- tools/editor/editor_help.cpp | 4 ++-- tools/editor/editor_node.cpp | 17 +++++++++++++---- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/tools/editor/editor_help.cpp b/tools/editor/editor_help.cpp index 808199e175..d026fa0c17 100644 --- a/tools/editor/editor_help.cpp +++ b/tools/editor/editor_help.cpp @@ -263,7 +263,7 @@ void EditorHelpSearch::_confirmed() { String mdata=ti->get_metadata(0); emit_signal("go_to_help",mdata); - editor->call("_editor_select",3); // in case EditorHelpSearch beeen invoked on top of other editor window + editor->call("_editor_select",2); // in case EditorHelpSearch beeen invoked on top of other editor window // go to that hide(); } @@ -1049,7 +1049,7 @@ Error EditorHelp::_goto_desc(const String& p_class,int p_vscr) { void EditorHelp::_request_help(const String& p_string) { Error err = _goto_desc(p_string); if (err==OK) { - editor->call("_editor_select",3); + editor->call("_editor_select",2); } //100 palabras } diff --git a/tools/editor/editor_node.cpp b/tools/editor/editor_node.cpp index 4e22592880..01e53ead18 100644 --- a/tools/editor/editor_node.cpp +++ b/tools/editor/editor_node.cpp @@ -169,9 +169,18 @@ void EditorNode::_unhandled_input(const InputEvent& p_event) { if (!p_event.key.mod.shift && !p_event.key.mod.command) _editor_select(3); break;*/ - case KEY_F1: _editor_select(0); break; - case KEY_F2: _editor_select(1); break; - case KEY_F3: _editor_select(2); break; + case KEY_F1: + if (!p_event.key.mod.shift && !p_event.key.mod.command) + _editor_select(0); + break; + case KEY_F2: + if (!p_event.key.mod.shift && !p_event.key.mod.command) + _editor_select(1); + break; + case KEY_F3: + if (!p_event.key.mod.shift && !p_event.key.mod.command) + _editor_select(2); + break; case KEY_F5: _menu_option_confirm((p_event.key.mod.control&&p_event.key.mod.shift)?RUN_PLAY_CUSTOM_SCENE:RUN_PLAY,true); break; case KEY_F6: _menu_option_confirm(RUN_PLAY_SCENE,true); break; case KEY_F7: _menu_option_confirm(RUN_PAUSE,true); break; @@ -2519,7 +2528,7 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) { case OBJECT_REQUEST_HELP: { if (current) { - _editor_select(3); + _editor_select(2); emit_signal("request_help",current->get_type()); } -- cgit v1.2.3 From 06957a8026bd20869fe11958d2cd8539c270354f Mon Sep 17 00:00:00 2001 From: neikeq Date: Wed, 25 Nov 2015 00:08:39 +0100 Subject: Fix Class Reference request from Inspector --- tools/editor/editor_help.cpp | 1 - tools/editor/plugins/script_editor_plugin.cpp | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/editor/editor_help.cpp b/tools/editor/editor_help.cpp index d026fa0c17..e65b4df1d0 100644 --- a/tools/editor/editor_help.cpp +++ b/tools/editor/editor_help.cpp @@ -1350,7 +1350,6 @@ void EditorHelp::_notification(int p_what) { // forward->set_icon(get_icon("Forward","EditorIcons")); // back->set_icon(get_icon("Back","EditorIcons")); _update_doc(); - editor->connect("request_help",this,"_request_help"); } break; } diff --git a/tools/editor/plugins/script_editor_plugin.cpp b/tools/editor/plugins/script_editor_plugin.cpp index 65ed420a51..a77c217f8c 100644 --- a/tools/editor/plugins/script_editor_plugin.cpp +++ b/tools/editor/plugins/script_editor_plugin.cpp @@ -1388,6 +1388,7 @@ void ScriptEditor::_notification(int p_what) { if (p_what==NOTIFICATION_READY) { get_tree()->connect("tree_changed",this,"_tree_changed"); + editor->connect("request_help",this,"_request_help"); } if (p_what==NOTIFICATION_EXIT_TREE) { @@ -2205,6 +2206,7 @@ void ScriptEditor::_bind_methods() { ObjectTypeDB::bind_method("_script_split_dragged",&ScriptEditor::_script_split_dragged); ObjectTypeDB::bind_method("_help_class_open",&ScriptEditor::_help_class_open); ObjectTypeDB::bind_method("_help_class_goto",&ScriptEditor::_help_class_goto); + ObjectTypeDB::bind_method("_request_help",&ScriptEditor::_help_class_open); ObjectTypeDB::bind_method("_history_forward",&ScriptEditor::_history_forward); ObjectTypeDB::bind_method("_history_back",&ScriptEditor::_history_back); } -- cgit v1.2.3