bevy/examples/ui
Mark Nokalt 306c1ac617 Rename Handle::as_weak() to cast_weak() (#5321)
# Objective

Following discussion on #3536 and #3522, `Handle::as_weak()` takes a type `U`, reinterpreting the handle as of another asset type while keeping the same ID. This is mainly used today in font atlas code. This PR does two things:

- Rename the method to `cast_weak()` to make its intent more clear
- Actually change the type uuid in the handle if it's not an asset path variant.

## Migration Guide

- Rename `Handle::as_weak` uses to `Handle::cast_weak`

    The method now properly sets the associated type uuid if the handle is a direct reference (e.g. not a reference to an `AssetPath`), so adjust you code accordingly if you relied on the previous behavior.
2022-10-28 22:43:14 +00:00
..
button.rs Rename UiColor to BackgroundColor (#6087) 2022-09-25 00:39:17 +00:00
font_atlas_debug.rs Rename Handle::as_weak() to cast_weak() (#5321) 2022-10-28 22:43:14 +00:00
text.rs Add Exponential Moving Average into diagnostics (#4992) 2022-10-24 13:46:37 +00:00
text_debug.rs fix nightly clippy warnings (#6395) 2022-10-28 21:03:01 +00:00
transparency_ui.rs Rename UiColor to BackgroundColor (#6087) 2022-09-25 00:39:17 +00:00
ui.rs Fixes scroll example after inverting UI Y axis (#6290) 2022-10-18 13:28:35 +00:00
ui_scaling.rs Rename example file scaling.rs to ui_scaling.rs (#6296) 2022-10-19 11:36:26 +00:00