Replies: 1 comment
-
I'm having a similar problem with a Label component for my game entities. I can't see a way to position the label or make it draw on top of the entity's sprite |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have been learning the new UI components in Bevy 0.15. I found the text component to be counter intuitive. For example when I was trying to make a simple UI element with centered text. I constructed the following entity. I expect that the text would show up centered on the UI element.
However I found that what I needed to do was separate out the text into a child entity of the first element with the following code.
For simple UI elements like buttons, I would expect that the Text component would be part of the same entity where I would control the color of the border or background for simple hover and button press logic. Would it be possible to refactor the Text component to work that way? Or is there a way to get the Text component to align without making a separate entity?
Beta Was this translation helpful? Give feedback.
All reactions