1
0
mirror of https://github.com/godotengine/godot.git synced 2026-01-03 19:11:41 +00:00

properly set emitting when particles restart

This commit is contained in:
clayjohn
2019-06-21 22:33:11 -07:00
parent 5a29be31b3
commit 64ecc8a5a3
13 changed files with 40 additions and 7 deletions

View File

@@ -62,6 +62,12 @@ void CPUParticlesEditor::_menu_option(int p_option) {
emission_tree_dialog->popup_centered_ratio();
} break;
case MENU_OPTION_RESTART: {
node->restart();
} break;
}
}
@@ -108,6 +114,8 @@ CPUParticlesEditor::CPUParticlesEditor() {
options->set_text(TTR("CPUParticles"));
options->get_popup()->add_item(TTR("Create Emission Points From Mesh"), MENU_OPTION_CREATE_EMISSION_VOLUME_FROM_MESH);
options->get_popup()->add_item(TTR("Create Emission Points From Node"), MENU_OPTION_CREATE_EMISSION_VOLUME_FROM_NODE);
options->get_popup()->add_separator();
options->get_popup()->add_item(TTR("Restart"), MENU_OPTION_RESTART);
options->get_popup()->connect("id_pressed", this, "_menu_option");
}