Reworked signal connection system, added support for Callable and Signal objects and made them default.
This commit is contained in:
committed by
Juan Linietsky
parent
1a4be2cd8f
commit
69c95f4b4c
@ -537,26 +537,26 @@ ImportDock::ImportDock() {
|
||||
add_margin_child(TTR("Import As:"), hb);
|
||||
import_as = memnew(OptionButton);
|
||||
import_as->set_disabled(true);
|
||||
import_as->connect("item_selected", this, "_importer_selected");
|
||||
import_as->connect_compat("item_selected", this, "_importer_selected");
|
||||
hb->add_child(import_as);
|
||||
import_as->set_h_size_flags(SIZE_EXPAND_FILL);
|
||||
preset = memnew(MenuButton);
|
||||
preset->set_text(TTR("Preset"));
|
||||
preset->set_disabled(true);
|
||||
preset->get_popup()->connect("index_pressed", this, "_preset_selected");
|
||||
preset->get_popup()->connect_compat("index_pressed", this, "_preset_selected");
|
||||
hb->add_child(preset);
|
||||
|
||||
import_opts = memnew(EditorInspector);
|
||||
add_child(import_opts);
|
||||
import_opts->set_v_size_flags(SIZE_EXPAND_FILL);
|
||||
import_opts->connect("property_toggled", this, "_property_toggled");
|
||||
import_opts->connect_compat("property_toggled", this, "_property_toggled");
|
||||
|
||||
hb = memnew(HBoxContainer);
|
||||
add_child(hb);
|
||||
import = memnew(Button);
|
||||
import->set_text(TTR("Reimport"));
|
||||
import->set_disabled(true);
|
||||
import->connect("pressed", this, "_reimport_attempt");
|
||||
import->connect_compat("pressed", this, "_reimport_attempt");
|
||||
hb->add_spacer();
|
||||
hb->add_child(import);
|
||||
hb->add_spacer();
|
||||
@ -564,7 +564,7 @@ ImportDock::ImportDock() {
|
||||
reimport_confirm = memnew(ConfirmationDialog);
|
||||
reimport_confirm->get_ok()->set_text(TTR("Save scenes, re-import and restart"));
|
||||
add_child(reimport_confirm);
|
||||
reimport_confirm->connect("confirmed", this, "_reimport_and_restart");
|
||||
reimport_confirm->connect_compat("confirmed", this, "_reimport_and_restart");
|
||||
|
||||
VBoxContainer *vbc_confirm = memnew(VBoxContainer());
|
||||
vbc_confirm->add_child(memnew(Label(TTR("Changing the type of an imported file requires editor restart."))));
|
||||
|
||||
Reference in New Issue
Block a user