1
0
Fork 0
mirror of https://github.com/Ellpeck/MLEM.git synced 2024-11-22 12:58:33 +01:00

fixed a ui demo crash when leaving while the wobble button is wobbling

This commit is contained in:
Ell 2021-10-30 15:35:46 +02:00
parent ca89d03ca4
commit 4966886b70

View file

@ -241,7 +241,7 @@ namespace Demos {
// Note that this particular example makes use of the Coroutine package, which is not required but makes demonstration easier
private static IEnumerator<Wait> WobbleButton(Element button) {
var counter = 0F;
while (counter < 4 * Math.PI) {
while (counter < 4 * Math.PI && button.Root != null) {
// Every element allows the implementation of any sort of custom rendering for itself and all of its child components
// This includes simply changing the transform matrix like here, but also applying custom effects and doing
// anything else that can be done in the SpriteBatch's Begin call.