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

Allow controllers to use options menu #369

Merged
merged 5 commits into from
May 31, 2023

Conversation

celvro
Copy link
Contributor

@celvro celvro commented May 24, 2023

  1. GameInput is hardcoded to keyboard, changed to use primary device. This updates when the menu is opened. Maybe there's a better spot to attach the device changing so it works while the menu is open
  2. Fixed when controller gets stuck on the HeadingToggle since it only has a click handler. Thanks @JKohlman for fixing the selected background and button toggle!
  3. Added controller icons for the KeyBind input! this uses uGUI.buttonCharacters internally so theoretically it works with anything in that array

fixes #263, #289

@celvro celvro changed the title Allow controllers to use settings Allow controllers to use options menu May 24, 2023
@LeeTwentyThree LeeTwentyThree linked an issue May 25, 2023 that may be closed by this pull request
Copy link
Member

@LeeTwentyThree LeeTwentyThree left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What I have seen is great and what I can test works well, although I don't have a controller myself to try. Regarding the code, it seems like a harmless change with very little room for errors.

Copy link
Contributor

@JKohlman JKohlman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems to work, does leave a couple issues/feature requests open - mainly actually showing selection on tabs and the Clear implementation.

@celvro are those things you'd want to look into for it or just at a later time?

@JKohlman
Copy link
Contributor

Also not a huge issue but to note: scrolling down it seems like we do invisibly select the headers but scrolling up it seems like we just immediately skip over the header

Copy link
Contributor

@JKohlman JKohlman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@celvro Please take a look at celvro#1 for potentially more improvements and approve, modify or reject that before we can merge this.

In that PR there is still a bug where the cursor skips the option above each heading when scrolling upwards

@celvro
Copy link
Contributor Author

celvro commented May 27, 2023

Ok looks good! I also fixed ps4 icons, my controller was sending the wrong inputs but the icons looked correct for the buttons it was sending 🤷

Here's a list of known issues, I'm fine merging as is and fixing incrementally:

  1. Options don't update immediately when primary device changes, you have to close and open the menu first.
  2. If you close the final options header, it lets you keep scrolling down and starts scrolling through tabs. You can't activate them until you hit back.
  3. The clear button doesn't work.
  4. When scrolling up from a header it skips one option.
  5. If SMLHelper is installed, the options panel doesn't get patched. This is unrelated to the controller fixes and seems to be intentional, Nautilus checks it in OptionsPanelPatcher before patching.

@JKohlman
Copy link
Contributor

I'm helping a family member move today but can you just confirm whether 2 and 4 are completely Nautilus bugs or whether they happen in vanilla game/options menus too?

@celvro
Copy link
Contributor Author

celvro commented May 27, 2023

Neither of them happen on vanilla but I don't think it has collapsible headers

On 4 I tested with a second mod installed and it didn't skip over the last setting on that one. It still happened on the Nautilus option. Weird but imo it's not a big deal

@JKohlman
Copy link
Contributor

Approved with the caveat that we note down the issues and take another crack at figuring them out but they're pretty weird/abstract

@LeeTwentyThree LeeTwentyThree merged commit b5a86a0 into SubnauticaModding:master May 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot interact with Mods menu using controller KeyCode from ConfigFile input doesn't recognize controller
3 participants