diff options
Diffstat (limited to 'tools/editor/create_dialog.cpp')
-rw-r--r-- | tools/editor/create_dialog.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/tools/editor/create_dialog.cpp b/tools/editor/create_dialog.cpp index 87f043783f..3e057ecf90 100644 --- a/tools/editor/create_dialog.cpp +++ b/tools/editor/create_dialog.cpp @@ -141,7 +141,7 @@ void CreateDialog::_sbox_input(const InputEvent& p_ie) { p_ie.key.scancode == KEY_PAGEUP || p_ie.key.scancode == KEY_PAGEDOWN ) ) { - search_options->call("_input_event",p_ie); + search_options->call("_gui_input",p_ie); search_box->accept_event(); } @@ -400,8 +400,11 @@ Object *CreateDialog::instance_selected() { if (selected) { - String custom = selected->get_metadata(0); + Variant md = selected->get_metadata(0); + String custom; + if (md.get_type()!=Variant::NIL) + custom=md; if (custom!=String()) { if (EditorNode::get_editor_data().get_custom_types().has(custom)) { @@ -646,7 +649,7 @@ CreateDialog::CreateDialog() { HSplitContainer *hbc = memnew( HSplitContainer ); add_child(hbc); - set_child_rect(hbc); + VBoxContainer *lvbc = memnew( VBoxContainer); hbc->add_child(lvbc); @@ -682,7 +685,7 @@ CreateDialog::CreateDialog() { favorite->connect("pressed",this,"_favorite_toggled"); vbc->add_margin_child(TTR("Search:"),search_hb); search_box->connect("text_changed",this,"_text_changed"); - search_box->connect("input_event",this,"_sbox_input"); + search_box->connect("gui_input",this,"_sbox_input"); search_options = memnew( Tree ); vbc->add_margin_child(TTR("Matches:"),search_options,true); get_ok()->set_text(TTR("Create")); @@ -929,7 +932,7 @@ CreateDialog::CreateDialog() { VBoxContainer *vbc = memnew( VBoxContainer ); add_child(vbc); - set_child_rect(vbc); + get_ok()->set_text("Create"); |