mirror of
https://github.com/bevyengine/bevy
synced 2024-12-25 12:33:07 +00:00
2d5ef75c9f
# 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. |
||
---|---|---|
.. | ||
convert.rs | ||
mod.rs |