Skip to content

Commit

Permalink
review: then
Browse files Browse the repository at this point in the history
  • Loading branch information
mockersf committed Jul 3, 2021
1 parent fbc6a4f commit ea13679
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions crates/bevy_ui/src/focus.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,13 +100,7 @@ pub fn ui_focus_system(
MouseButton::Right => ClickedWith::MouseRightButton,
MouseButton::Other(button) => ClickedWith::MouseOtherButton(*button),
})
.or_else(|| {
if touches_input.just_released(0) {
Some(ClickedWith::Touch)
} else {
None
}
});
.or_else(|| touches_input.just_released(0).then(|| ClickedWith::Touch));

let mut moused_over_z_sorted_nodes = node_query
.iter_mut()
Expand Down

0 comments on commit ea13679

Please sign in to comment.