Page 1 of 2
Click on quest to open instead of hover
Posted: Mon Apr 25, 2022 7:05 pm
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!
Re: Click on quest to open instead of hover
Posted: Mon Apr 25, 2022 9:34 pm
by Tony Li
Hi,
Untick the Standard UI Quest Log Window component's Selection Panel > Show Details On Select checkbox.
Re: Click on quest to open instead of hover
Posted: Wed Apr 27, 2022 2:13 pm
by gblekkenhorst
That was so easy, thank you!
Re: Click on quest to open instead of hover
Posted: Wed Apr 27, 2022 2:37 pm
by Tony Li
Glad to help!
Re: Click on quest to open instead of hover
Posted: Fri May 20, 2022 7:13 pm
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.
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);
}
Re: Click on quest to open instead of hover
Posted: Fri May 20, 2022 8:29 pm
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().
Re: Click on quest to open instead of hover
Posted: Tue Jun 07, 2022 12:46 pm
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)
Re: Click on quest to open instead of hover
Posted: Tue Jun 07, 2022 12:48 pm
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.
Re: Click on quest to open instead of hover
Posted: Thu Jun 09, 2022 1:31 pm
by gblekkenhorst
Awesome! I'll check it's there before I update.
Re: Click on quest to open instead of hover
Posted: Mon Jun 13, 2022 5:54 pm
by gblekkenhorst
Upgraded, got the checkbox, worked perfectly! Thanks!