-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
9-slice sprite is behaving weirdly on ImageBundle #11944
Comments
Further information: |
Could you provide some code to reproduce ? I made the slicing feature so I might be able to help and fix it |
I think the 9-slicing example can tell by replacing Because the upper one in this image also has this problem, but the actual button is larger than the image size, so I will also rename the issue. |
Texture atlas are not supported by slicing yet, but the Image bundle should work, I'll try |
@Litttlefish Yup it doesn't work with |
@Litttlefish Can you try with the fix ? |
|
# Objective Fixes bevyengine#11944 ## Solution bevyengine#11600 made an incorrect assumption on what `UiImageSize` does, removing its usage in slicing fixes the problem
# Objective Fixes bevyengine#11944 ## Solution bevyengine#11600 made an incorrect assumption on what `UiImageSize` does, removing its usage in slicing fixes the problem
# Objective Follow up to #11600 and #10588 #11944 made clear that some people want to use slicing with texture atlases ## Changelog * Added support for `TextureAtlas` slicing and tiling. `SpriteSheetBundle` and `AtlasImageBundle` can now use `ImageScaleMode` * Added new `ui_texture_atlas_slice` example using a texture sheet <img width="798" alt="Screenshot 2024-02-23 at 11 58 35" src="https://github.com/bevyengine/bevy/assets/26703856/47a8b764-127c-4a06-893f-181703777501"> --------- Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com> Co-authored-by: Pablo Reinhardt <126117294+pablo-lua@users.noreply.github.com>
# Objective Follow up to bevyengine#11600 and bevyengine#10588 bevyengine#11944 made clear that some people want to use slicing with texture atlases ## Changelog * Added support for `TextureAtlas` slicing and tiling. `SpriteSheetBundle` and `AtlasImageBundle` can now use `ImageScaleMode` * Added new `ui_texture_atlas_slice` example using a texture sheet <img width="798" alt="Screenshot 2024-02-23 at 11 58 35" src="https://github.com/bevyengine/bevy/assets/26703856/47a8b764-127c-4a06-893f-181703777501"> --------- Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com> Co-authored-by: Pablo Reinhardt <126117294+pablo-lua@users.noreply.github.com>
Follow up to bevyengine#11600 and bevyengine#10588 bevyengine#11944 made clear that some people want to use slicing with texture atlases * Added support for `TextureAtlas` slicing and tiling. `SpriteSheetBundle` and `AtlasImageBundle` can now use `ImageScaleMode` * Added new `ui_texture_atlas_slice` example using a texture sheet <img width="798" alt="Screenshot 2024-02-23 at 11 58 35" src="https://github.com/bevyengine/bevy/assets/26703856/47a8b764-127c-4a06-893f-181703777501"> --------- Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com> Co-authored-by: Pablo Reinhardt <126117294+pablo-lua@users.noreply.github.com>
Discussed in #11937
Originally posted by Litttlefish February 18, 2024
I'm using the 9-slice feature on 0.13 to rewrite a counter ui, but when using it, it give me a weird result that is not scaled down.(should be 60px x 30px)
If I remove ImageScaleMode component, then it will give me a sprite that is correctly resized.
Also I tried using it with SpriteBundle, seems working normally. (here is 240px x 30px)
The text was updated successfully, but these errors were encountered: