Fix nonexistent signal error.

This commit is contained in:
Relintai 2022-04-13 23:45:16 +02:00
parent 4dba63cb69
commit 68591bb15c
2 changed files with 8 additions and 1 deletions

View File

@ -41,13 +41,19 @@ void MDRUVRectEditorPopup::set_plugin(MDIEdPlugin *plugin) {
_editor->set_plugin(plugin);
}
void MDRUVRectEditorPopup::_notification(int p_what) {
if (p_what == NOTIFICATION_POSTINITIALIZE) {
connect("confirmed", this, "on_ok_pressed");
}
}
MDRUVRectEditorPopup::MDRUVRectEditorPopup() {
_editor = memnew(MDRUVRectEditor);
_editor->set_h_size_flags(SIZE_EXPAND_FILL);
_editor->set_v_size_flags(SIZE_EXPAND_FILL);
add_child(_editor);
connect("confirmed", this, "on_ok_pressed");
get_cancel()->connect("pressed", this, "on_cancel_pressed");
set_size(Vector2(700, 500));

View File

@ -43,6 +43,7 @@ public:
~MDRUVRectEditorPopup();
protected:
void _notification(int p_what);
static void _bind_methods();
MDRUVRectEditor *_editor;