-
Notifications
You must be signed in to change notification settings - Fork 40
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
Improved controller navigation in mod settings #325
Improved controller navigation in mod settings #325
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you. Two things would be nice before merging it. Please tell me if you think you can do them or if I should try my luck.
- Automatic scrolling of the scrollrect
- Some kind of visual indicator which setting is selected right now
The second would be trivial, most of the code is already there. For now I just chained the TargetGraphic of SelectableConfig to the TargetGraphic of the InteractionTarget and copy it's settings, so it does whatever those would do when selected (this is why the toggles light up fairly noticeably, whereas other things don't, they have more noticable settings already). However, we would need either an image that would do well with a color tint, sprites to swap between, or an animation. If there's something preexisting in valheim that would work I could hook it up easily, but if visual assets need to be created, I can't help with that. On the first... I could maybe do it, but the dynamic nature of the list throws me off badly, and I would need a few days away from the code, then a few more days studying the code (and what the structure looks like in game, gameobject hierarchy-wise), so would prefer to either leave that for another PR, or have you try your luck. |
So, I went and recreated the mod settings in Unity. Unfortunately that rendered this PR obsolete. Good news is, that it might be more easy to support controller now, since the whole GameObject is self-made and can be customized without having vanilla stuff interfering. If you find the time to take a look at it, I would be glad. Otherwise I will put that on my to-do list (but maybe not at the highest priority). |
Makes individual settings in Mod Settings navigable with a controller. Mostly addresses concerns I brought up in Issue Valheim-Modding/ModSettings#1
Interacts with some settings better than others:
Also binds the navigation from Ok button and back Button to each other. I attempted to get navigation from them back to the settings, but failed.
While this is far from perfect, it addresses the primary goal of making the mod settings navigable by controller, is overall an improvement , and further improvement is beyond my current familiarity with the code base.