| 365 | } |
| 366 | |
| 367 | WindowWrapper::WindowWrapper() { |
| 368 | if (!EditorNode::get_singleton()->is_multi_window_enabled()) { |
| 369 | return; |
| 370 | } |
| 371 | |
| 372 | window = memnew(Window); |
| 373 | window_id = window->get_instance_id(); |
| 374 | window->set_wrap_controls(true); |
| 375 | |
| 376 | add_child(window); |
| 377 | window->hide(); |
| 378 | |
| 379 | window->connect("close_requested", callable_mp(this, &WindowWrapper::_window_close_request)); |
| 380 | window->connect("size_changed", callable_mp(this, &WindowWrapper::_window_size_changed)); |
| 381 | |
| 382 | ShortcutBin *capturer = memnew(ShortcutBin); |
| 383 | window->add_child(capturer); |
| 384 | |
| 385 | window_background = memnew(Panel); |
| 386 | window_background->set_anchors_and_offsets_preset(PRESET_FULL_RECT); |
| 387 | window->add_child(window_background); |
| 388 | |
| 389 | ProgressDialog::get_singleton()->add_host_window(window); |
| 390 | } |
| 391 | |
| 392 | WindowWrapper::~WindowWrapper() { |
| 393 | if (ObjectDB::get_instance(window_id)) { |
nothing calls this directly
no test coverage detected