I’ve been working on creating my own navigation system hand-tailored to each specific GUI that needs it and I’ve noticed that the analog stick continued to move the selection box after I manually set SelectedObject and AutoSelectGuiEnabled was false. I tried disabling GuiNavigationEnabled but now the selection square still appears yet the A key is no longer binded to it. This is pretty frustrating as I’d like to be able to use the easy binding functionality of SelectedObject without the built in navigation. Am i doing something wrong or is what I’m trying to do not possible with the GuiService api.
“after I manually set SelectedObject and AutoSelectGuiEnabled was false. I tried disabling GuiNavigationEnabled”
After you press A use this
game:GetService'GuiService'.SelectedObject = nil
Edit: Oops I misunderstood, sorry x:
That’s not the problem. I just want to be able to use the easy binding-to-A feature of SelectedObject without any navigation.
The complete lack of documentation on the wiki is frustrating
Edit: Have you tried playing with the Selectable property in gui buttons? It stops navigation but allows pressing. If you press Select, it will default to any top left corner buttons - still manually settable to whatever you want with guiservice.SelectedObject
If that doesn’t help, you may as well hook up userinputservice’s ButtonA to the MouseButton1Click function. Simple fix but annoying. But I think you’ll be fine with the first stuff.
Hey Berezaa, just wanted to check in and see if you found a resolution to this problem. It’s on the agenda to expand our wiki information on this topic and it should be updated…soon…
Sorry for the lack of information on this topic.
You can do the following:
guiObject.NextSelectionDown = nil guiObject.NextSelectionUp = nil guiObject.NextSelectionLeft = nil guiObject.NextSelectionRight = nil
This will prevent the player from navigating away from the GUI that is selected.
You could also try selection groups. The calls are…
selectionName is a string that must match when removing a previously added group. selectionParent is some guiObject which holds the items in the group. Once you set a group, only selectable objects in that group can be selected. So if the group has one object (like your case) they won’t be able to select anything else.
The naming of the add is a little off, I’ll talk to Ben and see if we should change it.
I ended up just writing my own binds
UserInputService is surprisingly easy to work with and I should be able to submit my game well before my deadline.
It seems that even 6 years after this initial report, this bug is surprisingly still there…
Any plans to fix this issue in the near future?