UmbraLuminosa / sickle_ui

A widget library built on top of bevy_ui.
Apache License 2.0
205 stars 24 forks source link

Fixes #27

Closed UkoeHB closed 1 month ago

UkoeHB commented 1 month ago
eidloi commented 1 month ago
  • PseudoState can't implement Deserialize properly unless it contains a String. I don't like it either...

    • Add #[reflect(default)] to the delete_on_entered field. This field could use some documentation, it's pretty unclear what it does exactly.

Using a String is fine. I had the slice since I expected it to be used from code only but it makes sense to serialize it like you did.

As for the delete flag: static attributes are removed once they are applied from the dynamic style, but animated ones remain indefinitely. This can be an issue if you want to control the property that you also wanted to animate on enter. This flag deletes the animated property once the enter animation finished. As a side effect, the enter animation will be played again when the same animation is set on it later. This is due to the quirky nature of the enter animations that rely on previous state to figure out if they need to be played or not.

I am not in love with the current enter animation approach, but I didn't find the time to figure out a more elegant way to do it.

eidloi commented 1 month ago

I'll add a comment later on to the flag