Automatic button selection
Posted: Thu Aug 11, 2022 12:50 pm
Heya,
I'm having trouble with the auto-selection of buttons in my dialogue UI.
Currently, the open state looks like this:
When the subtitle panel is shown, the continue button is properly selected and reacts to submit as intended.
When the panel is hidden, I have the continue button set as non interactable, leading to the following issue:
As shown in the EventSystem's inspector, one of the control buttons gets auto-selected. This in turn causes the submit button to open the message log.
I've tried several things like disabling navigation on the buttons, to no avail. Auto-deselecting the control buttons whenever they get selected in turn leads to some very erratic behaviour. Keeping the continue button interactable throughout causes another bag of problems entirely, so I'd like to avoid going down that route.
Ideally, I'd like to find a way for the control buttons to not be auto-selected at all and only respond to either the assigned Key trigger or mouse clicks on the button itself. I did some digging through the UI panel scripts and also read up a bit in the Input System sections of the unity documentation, but so far I couldn't figure out which script is responsible the auto-selection.
I'd thus very much appreciate if you could give me a few pointers as to where auto-selection of interactable Buttons on the screen is handled.
I'm having trouble with the auto-selection of buttons in my dialogue UI.
Currently, the open state looks like this:
When the subtitle panel is shown, the continue button is properly selected and reacts to submit as intended.
When the panel is hidden, I have the continue button set as non interactable, leading to the following issue:
As shown in the EventSystem's inspector, one of the control buttons gets auto-selected. This in turn causes the submit button to open the message log.
I've tried several things like disabling navigation on the buttons, to no avail. Auto-deselecting the control buttons whenever they get selected in turn leads to some very erratic behaviour. Keeping the continue button interactable throughout causes another bag of problems entirely, so I'd like to avoid going down that route.
Ideally, I'd like to find a way for the control buttons to not be auto-selected at all and only respond to either the assigned Key trigger or mouse clicks on the button itself. I did some digging through the UI panel scripts and also read up a bit in the Input System sections of the unity documentation, but so far I couldn't figure out which script is responsible the auto-selection.
I'd thus very much appreciate if you could give me a few pointers as to where auto-selection of interactable Buttons on the screen is handled.