Fix animation_masks example's buttons (#15996)

# Objective

Fixes #15995

## Solution

Corrects a mistake made during the example migration in #15591.

`AnimationControl` was meant to be on the parent, not the child. So the
query in `update_ui` was no longer matching.

## Testing

`cargo run --example animation_masks`
This commit is contained in:
Rob Parrett 2024-10-18 16:53:10 -07:00 committed by GitHub
parent 3a478ad5c1
commit c65f2920bb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -316,6 +316,10 @@ fn add_mask_group_control(parent: &mut ChildBuilder, label: &str, width: Val, ma
..default() ..default()
}, },
BorderColor(Color::WHITE), BorderColor(Color::WHITE),
AnimationControl {
group_id: mask_group_id,
label: *label,
},
)) ))
.with_child(( .with_child((
Text(format!("{:?}", label)), Text(format!("{:?}", label)),
@ -330,10 +334,6 @@ fn add_mask_group_control(parent: &mut ChildBuilder, label: &str, width: Val, ma
margin: UiRect::vertical(Val::Px(3.0)), margin: UiRect::vertical(Val::Px(3.0)),
..default() ..default()
}, },
AnimationControl {
group_id: mask_group_id,
label: *label,
},
)); ));
} }
}); });