Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ISXB-544] Fix for 1.6.X: Wrong value is chosen when selecting GamepadButton in a dropdown menu #1860

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

ppandi-rythmos
Copy link

@ppandi-rythmos ppandi-rythmos commented Feb 27, 2024

Description

[Case ISXB-544] (https://jira.unity3d.com/browse/ISXB-544)

The GamepadButton enum has aliased enum members, and when detected by Unity as enum exposed as field and uses default property drawer, it causes confusing behaviour in the UI.
This PR tries to introduce a generic property drawers for aliased types, such that the UI now has aliased entries appended with names of the aliasing member in paranthesis (). This will be intuitive to the user and they would be aware that the selected value may be remapped on assignment

Changes made

A new property drawer for aliased enums has been introduced. It is made generic, so as to be extendable by any aliased enums in the Input System Package,

Checklist

Before review:

  • Changelog entry added.
    • Explains the change in Changed, Fixed, Added sections.
    • For API change contains an example snippet and/or migration example.
    • FogBugz ticket attached, example ([case %number%](https://issuetracker.unity3d.com/issues/...)).
    • FogBugz is marked as "Resolved" with next release version correctly set.
  • Tests added/changed, if applicable.
    • Functional tests Area_CanDoX, Area_CanDoX_EvenIfYIsTheCase, Area_WhenIDoX_AndYHappens_ThisIsTheResult.
    • Performance tests.
    • Integration tests.
  • Docs for new/changed API's.
    • Xmldoc cross references are set correctly.
    • Added explanation how the API works.
    • Usage code examples added.
    • The manual is updated, if needed.

During merge:

  • Commit message for squash-merge is prefixed with one of the list:
    • NEW: ___.
    • FIX: ___.
    • DOCS: ___.
    • CHANGE: ___.
    • RELEASE: 1.1.0-preview.3.

@ppandi-rythmos ppandi-rythmos changed the title [ISXB-544] Fix for 1.6.X: Wrong value is chosen when selecting Gamepa… [ISXB-544] Fix for 1.6.X: Wrong value is chosen when selecting GamepadButton in a dropdown menu Feb 27, 2024
@ppandi-rythmos
Copy link
Author

@ekcoh Kindly have a look at this PR

@ekcoh
Copy link
Collaborator

ekcoh commented Feb 29, 2024

Thanks for the contribution @ppandi-rythmos, I have rerouted your changes via #1862 PR with some small modifications.

@ekcoh
Copy link
Collaborator

ekcoh commented Feb 29, 2024

I will close this PR when the other one lands.

@ekcoh ekcoh added waiting-for-review The issue is scheduled to be reviewed by the Unity maintainers ignore-replaced-by-other-pr and removed waiting-for-review The issue is scheduled to be reviewed by the Unity maintainers labels Feb 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants