bevy/crates
ickshonpe 2d5ef75c9f
Val viewport unit variants (#8137)
# Objective

Add viewport variants to `Val` that specify a percentage length based on
the size of the window.

## Solution

Add the variants `Vw`, `Vh`, `VMin` and `VMax` to `Val`.
Add a physical window size parameter to the `from_style` function and
use it to convert the viewport variants to Taffy Points values.

One issue: It isn't responsive to window resizes. So `flex_node_system`
has to do a full update every time the window size changes. Perhaps this
can be fixed with support from Taffy.

---

## Changelog

* Added `Val` viewport unit variants `Vw`, `Vh`, `VMin` and `VMax`.
* Modified `convert` module to support the new `Val` variants.
* Changed `flex_node_system` to support the new `Val` variants.
* Perform full layout update on screen resizing, to propagate the new
viewport size to all nodes.
2023-03-21 19:14:27 +00:00
..
bevy_a11y chore: Release (#7920) 2023-03-06 05:13:36 +00:00
bevy_animation Schedule-First: the new and improved add_systems (#8079) 2023-03-18 01:45:34 +00:00
bevy_app Schedule-First: the new and improved add_systems (#8079) 2023-03-18 01:45:34 +00:00
bevy_asset Schedule-First: the new and improved add_systems (#8079) 2023-03-18 01:45:34 +00:00
bevy_audio Schedule-First: the new and improved add_systems (#8079) 2023-03-18 01:45:34 +00:00
bevy_core Schedule-First: the new and improved add_systems (#8079) 2023-03-18 01:45:34 +00:00
bevy_core_pipeline Schedule-First: the new and improved add_systems (#8079) 2023-03-18 01:45:34 +00:00
bevy_derive chore: Release (#7920) 2023-03-06 05:13:36 +00:00
bevy_diagnostic Schedule-First: the new and improved add_systems (#8079) 2023-03-18 01:45:34 +00:00
bevy_dylib chore: Release (#7920) 2023-03-06 05:13:36 +00:00
bevy_dynamic_plugin chore: Release (#7920) 2023-03-06 05:13:36 +00:00
bevy_ecs bevy_ecs: add untyped methods for inserting components and bundles (#7204) 2023-03-21 00:33:11 +00:00
bevy_ecs_compile_fail_tests Update trybuild tests for Rust 1.68 (#8002) 2023-03-09 15:46:06 +00:00
bevy_encase_derive chore: Release (#7920) 2023-03-06 05:13:36 +00:00
bevy_gilrs Schedule-First: the new and improved add_systems (#8079) 2023-03-18 01:45:34 +00:00
bevy_gizmos Fix crash when enabling HDR on 2d cameras (#8151) 2023-03-21 18:31:52 +00:00
bevy_gltf chore: Release (#7920) 2023-03-06 05:13:36 +00:00
bevy_hierarchy Schedule-First: the new and improved add_systems (#8079) 2023-03-18 01:45:34 +00:00
bevy_input Schedule-First: the new and improved add_systems (#8079) 2023-03-18 01:45:34 +00:00
bevy_internal Immediate Mode Line/Gizmo Drawing (#6529) 2023-03-20 20:57:54 +00:00
bevy_log chore: Release (#7920) 2023-03-06 05:13:36 +00:00
bevy_macro_utils chore: Release (#7920) 2023-03-06 05:13:36 +00:00
bevy_math chore: Release (#7920) 2023-03-06 05:13:36 +00:00
bevy_mikktspace chore: Release (#7920) 2023-03-06 05:13:36 +00:00
bevy_pbr Left-handed y-up cubemap coordinates (#8122) 2023-03-18 23:06:53 +00:00
bevy_ptr chore: Release (#7920) 2023-03-06 05:13:36 +00:00
bevy_reflect Fix typo in utility.rs (#7997) 2023-03-09 09:20:45 +00:00
bevy_reflect_compile_fail_tests Update trybuild tests for Rust 1.68 (#8002) 2023-03-09 15:46:06 +00:00
bevy_render Allow SPIR-V shaders to process when shader defs are present (#7772) 2023-03-19 09:26:26 +00:00
bevy_scene (De) serialize resources in scenes (#6846) 2023-03-20 21:17:02 +00:00
bevy_sprite Derive Copy and Clone for Collision (#8121) 2023-03-18 04:55:31 +00:00
bevy_tasks chore: Release (#7920) 2023-03-06 05:13:36 +00:00
bevy_text Schedule-First: the new and improved add_systems (#8079) 2023-03-18 01:45:34 +00:00
bevy_time Schedule-First: the new and improved add_systems (#8079) 2023-03-18 01:45:34 +00:00
bevy_transform Schedule-First: the new and improved add_systems (#8079) 2023-03-18 01:45:34 +00:00
bevy_ui Val viewport unit variants (#8137) 2023-03-21 19:14:27 +00:00
bevy_utils chore: Release (#7920) 2023-03-06 05:13:36 +00:00
bevy_window Schedule-First: the new and improved add_systems (#8079) 2023-03-18 01:45:34 +00:00
bevy_winit Schedule-First: the new and improved add_systems (#8079) 2023-03-18 01:45:34 +00:00