Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Derive Ord for GamepadButtonType. (bevyengine#11791)
# Objective Use `GamepadButtonType` with library that requires `Ord`. ## Motivation `KeyCode` derives `Ord` that I'm using with a trie for recognizing [input sequences](https://github.com/shanecelis/bevy-input-sequence/tree/trie). I would like to do the same for `GamepadButtonType` but am stymied by it not deriving `Ord`. ## Solution This PR add derivations PartialOrd and Ord for `GamepadButtonType`. ## Workaround If deriving `Ord` is not possible, I'd be happy to know how I might coerce `GamepadButtonType` into a `u32` or something else that is `Ord`, so I can wrap `GamepadButtonType` in a newtype. I suppose serializing with serde may work or reflect?
- Loading branch information