Skip to content

Commit

Permalink
Fix animation_masks example's buttons (bevyengine#15996)
Browse files Browse the repository at this point in the history
# Objective

Fixes bevyengine#15995

## Solution

Corrects a mistake made during the example migration in bevyengine#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`
  • Loading branch information
rparrett authored Oct 18, 2024
1 parent 3a478ad commit c65f292
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions examples/animation/animation_masks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,10 @@ fn add_mask_group_control(parent: &mut ChildBuilder, label: &str, width: Val, ma
..default()
},
BorderColor(Color::WHITE),
AnimationControl {
group_id: mask_group_id,
label: *label,
},
))
.with_child((
Text(format!("{:?}", label)),
Expand All @@ -330,10 +334,6 @@ fn add_mask_group_control(parent: &mut ChildBuilder, label: &str, width: Val, ma
margin: UiRect::vertical(Val::Px(3.0)),
..default()
},
AnimationControl {
group_id: mask_group_id,
label: *label,
},
));
}
});
Expand Down

0 comments on commit c65f292

Please sign in to comment.