glfw-rs icon indicating copy to clipboard operation
glfw-rs copied to clipboard

Added mouse button aliases

Open vallentin opened this issue 1 year ago • 0 comments

This might be a personal preference, but I usually have MouseButton imported, which would make it easier to do MouseButton::Left, compared to importing glfw::MouseButtonLeft.

Additionally, this is also sliiiightly "safer" to use, as if someone forgets to import glfw::MouseButtonLeft, then matching on a MouseButton and having MouseButtonLeft in a match arm, that would only produce a warning. While forgetting to import MouseButton when using MouseButton::Left, would cause an error.


I can refactor some of the MouseButtonLeft (and friends) doc references, to instead point to MouseButton::Left (and friends), if that is desired?

vallentin avatar Aug 04 '24 05:08 vallentin