ManevilleF / hexx

Hexagonal tools lib in rust
Apache License 2.0
288 stars 23 forks source link

Implement bevy reflect traits #98

Closed killercup closed 1 year ago

killercup commented 1 year ago

Is your feature request related to a problem? Please describe. I wanted to see/edit hexx components using bevy-inspector-egui and saw that they don't implement bevy::Reflect.

Describe the solution you'd like Add a feature flag to add the trait derives.

Additional context I made this super tiny commit a while ago for the previous version but never turned it into a PR. You're welcome to take this diff and use it as you see fit, consider it public domain. Maybe I have time to look at it again in a couple weeks :)

uvizhe commented 1 year ago

Hey, I'm going to PR this as I need this feature right now. Would reflect feature name be suitable?

ManevilleF commented 1 year ago

Hey, I'm going to PR this as I need this feature right now. Would reflect feature name be suitable?

I'd say bevy_reflect is better like:

bevy_reflect = ["dep:bevy_reflect"]
uvizhe commented 1 year ago

BTW, I was going to add Reflect to Hex only. Not sure if it's enough, tho.

ManevilleF commented 1 year ago

BTW, I was going to add Reflect to Hex only. Not sure if it's enough, tho.

I think you should also add it to Direction, DiagonalDirection, HexBounds and HexLayout