bevy/examples/ui
Zachary Harrold 90b3ac7f3a
Added Val::ZERO Constant (#9566)
# Objective

- Fixes #9533

## Solution

* Added `Val::ZERO` as a constant which is defined as `Val::Px(0.)`.
* Added manual `PartialEq` implementation for `Val` which allows any
zero value to equal any other zero value. E.g., `Val::Px(0.) ==
Val::Percent(0.)` etc. This is technically a breaking change, as
`Val::Px(0.) == Val::Percent(0.)` now equals `true` instead of `false`
(as an example)
* Replaced instances of `Val::Px(0.)`, `Val::Percent(0.)`, etc. with
`Val::ZERO`
* Fixed `bevy_ui::layout::convert::tests::test_convert_from` test to
account for Taffy not equating `Points(0.)` and `Percent(0.)`. These
tests now use `assert_eq!(...)` instead of `assert!(matches!(...))`
which gives easier to diagnose error messages.
2023-08-26 14:00:53 +00:00
..
borders.rs Ui Node Borders (#7795) 2023-06-14 22:43:38 +00:00
button.rs Rename Interaction::Clicked -> Interaction::Pressed (#8989) (#9027) 2023-07-05 09:25:31 +00:00
display_and_visibility.rs UI examples clean up (#9479) 2023-08-23 12:49:10 +00:00
flex_layout.rs UI examples clean up (#9479) 2023-08-23 12:49:10 +00:00
font_atlas_debug.rs Added Val::ZERO Constant (#9566) 2023-08-26 14:00:53 +00:00
grid.rs UI examples clean up (#9479) 2023-08-23 12:49:10 +00:00
overflow.rs Flatten UI Style properties that use Size + remove Size (#8548) 2023-05-16 01:36:32 +00:00
overflow_debug.rs Fix CI for Rust 1.72 (#9562) 2023-08-25 12:34:24 +00:00
relative_cursor_position.rs UI examples clean up (#9479) 2023-08-23 12:49:10 +00:00
size_constraints.rs Fix typos throughout the project (#9090) 2023-07-10 00:11:51 +00:00
text.rs Update text example using default font (#9259) 2023-07-24 18:35:14 +00:00
text_debug.rs Allow tuples and single plugins in add_plugins, deprecate add_plugin (#8097) 2023-06-21 20:51:03 +00:00
text_wrap_debug.rs NoWrap Text feature (#8947) 2023-06-26 16:23:00 +00:00
transparency_ui.rs Flatten UI Style properties that use Size + remove Size (#8548) 2023-05-16 01:36:32 +00:00
ui.rs UI examples clean up (#9479) 2023-08-23 12:49:10 +00:00
ui_scaling.rs Change UiScale to a tuple struct (#9444) 2023-08-16 18:18:50 +00:00
ui_texture_atlas.rs UI texture atlas support (#8822) 2023-06-19 21:52:02 +00:00
viewport_debug.rs Change UiScale to a tuple struct (#9444) 2023-08-16 18:18:50 +00:00
window_fallthrough.rs Schedule-First: the new and improved add_systems (#8079) 2023-03-18 01:45:34 +00:00
z_index.rs Flatten UI Style properties that use Size + remove Size (#8548) 2023-05-16 01:36:32 +00:00