bevy/crates/bevy_core_widgets/src
ickshonpe 5e8aa7986b
Newtyped ScrollPosition (#19881)
# Objective

Change `ScrollPosition` to newtype `Vec2`. It's easier to work with a
`Vec2` wrapper than individual fields.

I'm not sure why this wasn't newtyped to start with. Maybe the intent
was to support responsive coordinates eventually but that probably isn't
very useful or straightforward to implement. And even if we do want to
support responsive coords in the future, it can newtype `Val2`.

## Solution

Change `ScrollPosition` to newtype `Vec2`. 

Also added some extra details to the doc comments.

## Testing

Try the `scroll` example.

---------

Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com>
2025-07-01 17:41:48 +00:00
..
callback.rs Change core widgets to use callback enum instead of option (#19855) 2025-07-01 03:23:38 +00:00
core_button.rs Change core widgets to use callback enum instead of option (#19855) 2025-07-01 03:23:38 +00:00
core_checkbox.rs Change core widgets to use callback enum instead of option (#19855) 2025-07-01 03:23:38 +00:00
core_radio.rs Feathers checkbox (#19900) 2025-07-01 06:59:14 +00:00
core_scrollbar.rs Newtyped ScrollPosition (#19881) 2025-07-01 17:41:48 +00:00
core_slider.rs Change core widgets to use callback enum instead of option (#19855) 2025-07-01 03:23:38 +00:00
lib.rs Change core widgets to use callback enum instead of option (#19855) 2025-07-01 03:23:38 +00:00