Two Panel Quest Log Window with Text Mesh Pro

Announcements, support questions, and discussion for the Dialogue System.
User avatar
nathanj
Posts: 303
Joined: Sat May 28, 2016 12:30 am

Two Panel Quest Log Window with Text Mesh Pro

Post by nathanj »

Hi Again,

Is there a two panel Quest Log Window that uses Text Mesh Pro?

Nathan
User avatar
Tony Li
Posts: 22057
Joined: Thu Jul 18, 2013 1:27 pm

Re: Two Panel Quest Log Window with Text Mesh Pro

Post by Tony Li »

Hi Nathan,

There isn't a prefab. But you can take any of the Standard UI Quest Log Window prefabs that use Unity UI, replace the UI Texts with TextMeshProUGUIs, and assign them to the Standard UI Quest Log Window's fields.

The Standard UI system lets you assign UI Text or TextMeshProUGUI to any UI text field. To make the TMP version of the field available, unassign the UI Text from the field. After you do this, the field will have two slots, one for UI Text and a second for TMP. When you assign a TextMeshProGUI, the slot for UI Text will disappear.
User avatar
nathanj
Posts: 303
Joined: Sat May 28, 2016 12:30 am

Re: Two Panel Quest Log Window with Text Mesh Pro

Post by nathanj »

Wow, that is awesome.

I knew you had integrated TMP but I didn't understand how it worked.

Thank you!
User avatar
nathanj
Posts: 303
Joined: Sat May 28, 2016 12:30 am

Re: Two Panel Quest Log Window with Text Mesh Pro

Post by nathanj »

Hey again, Tony

If I wanted the Buttons in the Quest Log window to respond to Select() rather than OnClick(), any idea on how would I go about making this change?

Thanks again,
Nathan
User avatar
Tony Li
Posts: 22057
Joined: Thu Jul 18, 2013 1:27 pm

Re: Two Panel Quest Log Window with Text Mesh Pro

Post by Tony Li »

Hi Nathan,

I can add that as an option in the next version. Otherwise it will require making a subclass of StandardUIQuestLogWindow and overriding the OnQuestListUpdated() method to change this (in 2 places):

Code: Select all

questTitle.button.onClick.AddListener(() => { OnClickQuest(target); });
to something like this (depending on how you want it to work):

Code: Select all

var trigger = questTitle.button.GetComponent<UnityEngine.EventSystems.EventTrigger>();
var entry = new UnityEngine.EventSystems.EventTrigger.Entry();
entry.eventID = UnityEngine.EventSystems.EventTriggerType.Select;
entry.callback.AddListener((eventData) => { OnClickQuest(target); });
trigger.triggers.Add(entry);
And you'd also need to add an EventTrigger component to the template button.

Can you describe exactly what you want this to do? If you hover the mouse over a quest button the Quest Selection Panel (typically on the left), do you want it to automatically show the quest details in the Quest Details Panel (typically on the right)? Similarly, as you navigate the quest buttons using a joystick, it would automatically show the details.
User avatar
nathanj
Posts: 303
Joined: Sat May 28, 2016 12:30 am

Re: Two Panel Quest Log Window with Text Mesh Pro

Post by nathanj »

Thanks, Tony

Yes, I'm converting the UI to be Xbox controller friendly. As you describe, I would like it that when the button is selected it opens the description of the button in the other panel.

Nathan
User avatar
Tony Li
Posts: 22057
Joined: Thu Jul 18, 2013 1:27 pm

Re: Two Panel Quest Log Window with Text Mesh Pro

Post by Tony Li »

Okay, that sounds like a handy option. I'll add that in the next version.
User avatar
nathanj
Posts: 303
Joined: Sat May 28, 2016 12:30 am

Re: Two Panel Quest Log Window with Text Mesh Pro

Post by nathanj »

Hey Tony

Does the Quest TRacker HUD need to be a child of the Dialogue System Controller? I'm testing out some stuff with VR and it only seems to appear when it's a child of the DSC. Is there any way around this?


Thanks again,
Nathan
User avatar
Tony Li
Posts: 22057
Joined: Thu Jul 18, 2013 1:27 pm

Re: Two Panel Quest Log Window with Text Mesh Pro

Post by Tony Li »

Hi Nathan,

The Quest Tracker HUD must be a child of the Dialogue Manager, but in retrospect that's a silly requirement. I'll make a patch available to fix that.
User avatar
Tony Li
Posts: 22057
Joined: Thu Jul 18, 2013 1:27 pm

Re: Two Panel Quest Log Window with Text Mesh Pro

Post by Tony Li »

Nathan,

The patch is available on the Pixel Crushers customer download site. You don't need to do anything except import it, and then standard UI quest trackers will work outside of the Dialogue Manager GameObject hierarchy.
Post Reply