This repository has been archived by the owner on Feb 18, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 10
Can't change nine patch texture #2
Comments
I am encountering the same problem, is there a way to do this? |
ATM no, but there is a workaround: You could have 3 node bundles each containing the nine patch with the right texture, and then set the display property accordingly... ...but by doing this I am experiencing a weird bug where the nine patches are all square in size, even though I set different width and height |
Yeah that's what I figured, I might do this in the future, thanks! |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Is there an easy way to change the texture of the nine patch?
I'm trying to make a UI button which has nine patch states for normal, hover & pressed
Here are the things I've tried:
nine_patch_data.texture
in a system but this doesn't appear to workdespawn(nine_patch_bundle)
but this doesn't remove the child objectsdespawn_recursive
, but then spawning a new NinePatchBundle under the same parent (a ButtonBundle) doesn't result in it getting drawn, not sure why?I'm also finding after (3.) is run a number of times, my FPS grinds quickly down to a few frames a second.
Do you have any tips on debugging / improving the performance of the UI? Perhaps I can cache the 3 nine patches I need for the button in some way? Still very new to Bevy!
Great tool, very excited to be trying it out 😄
Here's what I'm toying with:
The text was updated successfully, but these errors were encountered: