1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-11 13:10:58 +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

@@ -102,6 +102,10 @@ void Particles2DEditorPlugin::_menu_callback(int p_idx) {
ur->commit_action();
} break;
case MENU_RESTART: {
particles->restart();
}
}
}
@@ -380,6 +384,8 @@ Particles2DEditorPlugin::Particles2DEditorPlugin(EditorNode *p_node) {
// menu->get_popup()->add_item(TTR("Clear Emission Mask"), MENU_CLEAR_EMISSION_MASK);
menu->get_popup()->add_separator();
menu->get_popup()->add_item(TTR("Convert to CPUParticles"), MENU_OPTION_CONVERT_TO_CPU_PARTICLES);
menu->get_popup()->add_separator();
menu->get_popup()->add_item(TTR("Restart"), MENU_RESTART);
menu->set_text(TTR("Particles"));
menu->set_switch_on_hover(true);
toolbar->add_child(menu);