1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-08 12:40:44 +00:00

[Native File Dialog] Add support for using native dialogs in the editor.

This commit is contained in:
bruvzg
2024-03-21 10:42:38 +02:00
parent 86415f0245
commit 61f7145f43
17 changed files with 516 additions and 126 deletions

View File

@@ -251,7 +251,7 @@ void CPUParticles2DEditorPlugin::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_ENTER_TREE: {
menu->get_popup()->connect("id_pressed", callable_mp(this, &CPUParticles2DEditorPlugin::_menu_callback));
menu->set_icon(epoints->get_editor_theme_icon(SNAME("CPUParticles2D")));
menu->set_icon(file->get_editor_theme_icon(SNAME("CPUParticles2D")));
file->connect("file_selected", callable_mp(this, &CPUParticles2DEditorPlugin::_file_selected));
} break;
}
@@ -284,13 +284,6 @@ CPUParticles2DEditorPlugin::CPUParticles2DEditorPlugin() {
file->set_file_mode(EditorFileDialog::FILE_MODE_OPEN_FILE);
toolbar->add_child(file);
epoints = memnew(SpinBox);
epoints->set_min(1);
epoints->set_max(8192);
epoints->set_step(1);
epoints->set_value(512);
file->get_vbox()->add_margin_child(TTR("Generated Point Count:"), epoints);
emission_mask = memnew(ConfirmationDialog);
emission_mask->set_title(TTR("Load Emission Mask"));
VBoxContainer *emvb = memnew(VBoxContainer);