Quest Log UI - first quest button not selected

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
walczak
Posts: 5
Joined: Tue Oct 11, 2022 9:42 pm

Quest Log UI - first quest button not selected

Post by walczak »

I am able to display all quesst in groups as active and completed. I have the option to Select First quest on onen selected, however the first quest button is not focused, making the controller usage impossible. How can I select first button as well as first quest on Open()? Thanks!
User avatar
Tony Li
Posts: 21679
Joined: Thu Jul 18, 2013 1:27 pm

Re: Quest Log UI - first quest button not selected

Post by Tony Li »

Hi,

Select First Quest On Open shows the details of the first quest as if the player had clicked on the first quest button.

To ensure that the quest button itself is focused (selected), inspect the Dialogue Manager GameObject's Input Device Manager component, and tick Always Auto Focus.
walczak
Posts: 5
Joined: Tue Oct 11, 2022 9:42 pm

Re: Quest Log UI - first quest button not selected

Post by walczak »

Hello. Thanks for the reply. I did all check all the steps and I have everything like you recomended and it still isn't working. I checked and for some reason the selecte button is the Active Questst switcher button and when I disabled it it was the Group toggle button. I am using new Input system if this matters.
User avatar
Tony Li
Posts: 21679
Joined: Thu Jul 18, 2013 1:27 pm

Re: Quest Log UI - first quest button not selected

Post by Tony Li »

Hi,

I think we just have a small miscommunication. The "Select First Quest On Open" checkbox will show the details of the first quest when the quest log window opens. It does nothing with the EventSystem.

If you want the EventSystem to select (focus) the first quest in the list, here are two ways:

1. Make and use a subclass of StandardUIQuestLogWindow. Override the OpenWindow() method. At the end the method, select the first button:

Code: Select all

public override void OpenWindow(System.Action openedWindowHandler)
    base.OpenWindow(openedWindowHandler);
    foreach (var content in selectionPanelContentManager.instancedContent)
    {
        if (content is StandardUIQuestTitleButtonTemplate buttonContent)
        {
            UITools.Select(buttonContent.button);
            break;
        }
    }
}
2. Or use the OnOpen() UnityEvent to do the same. It will still require some code, but you can assign your own script component instead of making a subclass.
Post Reply