Hi,
I'd like to make the following changes on the UI behaboiur for the Quest Journal UI. I've tried following the buttons and scripts but it's not really very clear to me how to do it (preferably without changing your code):
- Groups (Currently I'm using Main and Side) opened (And all the quests under the groups) listed (instead of pressing the group buttons) right when you open the journal.
-Showing the detail information on the right panel on button hover instead on On click. It looks very obvious to do it but as the action it´s not on the UI button I don't know wich one to use it.
- Is it possible to always show the Quest Icon (the one you fill on the very beginning of the quest) on the Journal, instead of having to add it on every state of the Quest / node? Thanks
Quest Journal UI
Re: Quest Journal UI
Hi,
Inspect your quest journal UI. Click the three-bar menu in the upper right of the Inspector, and select Debug. Drag your subclass script into the quest journal UI's Script field. This will tell your quest journal UI to use it instead of UnityUIQuestJournalUI, but it will still keep all of your UI element assignments.
Also add an Event Trigger component. Configure the Pointer Enter event to call ClickButton.ClickNow:
Make a subclass of UnityUIQuestJournalUI. Override the IsGroupExpanded function:GorkaGames wrote: ↑Sat Oct 13, 2018 2:58 pm- Groups (Currently I'm using Main and Side) opened (And all the quests under the groups) listed (instead of pressing the group buttons) right when you open the journal.
Code: Select all
public class MyQuestJournalUI : UnityUIQuestJournalUI
{
public override bool IsGroupExpanded(string groupName)
{
return true; // All groups are always expanded.
}
}
Add a small script to the Active Quest Name Template button:GorkaGames wrote: ↑Sat Oct 13, 2018 2:58 pm-Showing the detail information on the right panel on button hover instead on On click. It looks very obvious to do it but as the action it´s not on the UI button I don't know wich one to use it.
Code: Select all
using UnityEngine;
public class ClickButton : MonoBehaviour
{
public void ClickNow()
{
GetComponent<UnityEngine.UI.Button>().onClick.Invoke();
}
}
That's a good idea. I'll add it to the next version. In the meantime, you can make a subclass of UnityUIQuestNameButtonTemplate. Add a variable for a UI Image. Override the Assign() method to set the image:GorkaGames wrote: ↑Sat Oct 13, 2018 2:58 pm- Is it possible to always show the Quest Icon (the one you fill on the very beginning of the quest) on the Journal, instead of having to add it on every state of the Quest / node?
Code: Select all
public class MyQuestNameButtonTemplate : UnityUIQuestNameButtonTemplate
{
public UnityEngine.UI.Image icon;
public override void Assign(Quest quest, ToggleChangedDelegate trackToggleDelegate)
{
base.Assign(quest, trackToggleDelegate);
icon.sprite = quest.icon;
}
}
Replace the UnityUIQuestNameButtonTemplate script on the Active Quest Name Template and Completed Quest Name Template GameObjects.