Click on quest to open instead of hover

Announcements, support questions, and discussion for the Dialogue System.
gblekkenhorst
Posts: 83
Joined: Wed Jun 24, 2020 5:06 pm

Click on quest to open instead of hover

Post by gblekkenhorst »

We're trying to switch our quest menu so the quests are listed by title, and then clicking on the quest title will then open a new panel with the quest details. We'd use a back button to return to the list. The current template we're adapting is 'Basic Standard UI Quest Log Window', it's displaying quests content when you hover over them. I can't find where this code is executing, the button seems to be controlled by 'StandardUIQuestTitleButtonTemplate' but there only seems to be Awake and Assign in that script - where is the hover being called so I can disable it and reprogram it to be a button click?

Thanks!
User avatar
Tony Li
Posts: 22148
Joined: Thu Jul 18, 2013 1:27 pm

Re: Click on quest to open instead of hover

Post by Tony Li »

Hi,

Untick the Standard UI Quest Log Window component's Selection Panel > Show Details On Select checkbox.
gblekkenhorst
Posts: 83
Joined: Wed Jun 24, 2020 5:06 pm

Re: Click on quest to open instead of hover

Post by gblekkenhorst »

That was so easy, thank you!
User avatar
Tony Li
Posts: 22148
Joined: Thu Jul 18, 2013 1:27 pm

Re: Click on quest to open instead of hover

Post by Tony Li »

Glad to help!
gblekkenhorst
Posts: 83
Joined: Wed Jun 24, 2020 5:06 pm

Re: Click on quest to open instead of hover

Post by gblekkenhorst »

I ran into a weird bug with this - if I click the same quest twice in a row, it's blank the second time. (In between I hit a back button that turns off the description panel and reopens the list panel.) It's works fine so long as I click a different quest in between.
Image

Here is the code I'm using for the back button:

Code: Select all

        public void DisplayTasksUI()
        {
            logwindow = runtimeQuestLogWindow.GetComponent<StandardUIQuestLogWindow>();
            logwindow.OnQuestListUpdated();
            runtimeQuestLogWindow.Open();
            logwindow.taskDescObj.SetActive(false);
            ScrollView.SetActive(false);
            logwindow.taskListOBJ.SetActive(true);
            BackButton.SetActive(true);
        }
User avatar
Tony Li
Posts: 22148
Joined: Thu Jul 18, 2013 1:27 pm

Re: Click on quest to open instead of hover

Post by Tony Li »

Hi,

The quest log window's default behavior is to toggle the quest details when you click on the quest heading. If you don't want this behavior, untick Deselect Quest On Second Click.

For your back button, set the selectedQuest property to string.Empty and then call OnQuestListUpdated().
gblekkenhorst
Posts: 83
Joined: Wed Jun 24, 2020 5:06 pm

Re: Click on quest to open instead of hover

Post by gblekkenhorst »

I can't find Deselect Quest On Second Click - I'm using 2.2.17, will I need to update?

I can't set selectedQuest as it's protected. Is there a function to access to change this, or should I write one?

(Sorry for coming back to this so much later, I had to prioritize other things in the meantime)
User avatar
Tony Li
Posts: 22148
Joined: Thu Jul 18, 2013 1:27 pm

Re: Click on quest to open instead of hover

Post by Tony Li »

Hi,

You'll need to update. If you're not in a rush, I recommend waiting until later today. Version 2.2.28 is scheduled to release today.
gblekkenhorst
Posts: 83
Joined: Wed Jun 24, 2020 5:06 pm

Re: Click on quest to open instead of hover

Post by gblekkenhorst »

Awesome! I'll check it's there before I update.
gblekkenhorst
Posts: 83
Joined: Wed Jun 24, 2020 5:06 pm

Re: Click on quest to open instead of hover

Post by gblekkenhorst »

Upgraded, got the checkbox, worked perfectly! Thanks!
Post Reply