Skip to content

[Request] Improve comparisons for MouseButton #9

@x4e

Description

@x4e

The provided MouseButton enum is very useful, however has some problems.

Multiple mouse buttons are defined for the same underlying id (e.g. 1 and LEFT both have the same id of 0).

This means the following expression will evaluate to false: MouseButton.of(0) == MouseButton.LEFT.

Potential solution:
Remove enum types 1, 2, 3, LAST. This would break backwards compatibility.

Perhaps there is another solution that doesnt break backwards compatibility?

Sadly its not possible to override Enum.equals which would probably be the best solution.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions