Using the Quest Log Window with the Keyboard

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
User avatar
Tony Li
Posts: 22101
Joined: Thu Jul 18, 2013 1:27 pm

Using the Quest Log Window with the Keyboard

Post by Tony Li »

Ameliyn wrote: Fri Jul 22, 2022 6:02 pmI'm creating a web-based game that only uses the keyboard (no mouse). I'm trying to use the pixel crushers quest journal, but I can't seem to find a way to select each quest to see their details, or to turn on and off tracking with the keyboard. When I open the quest journal, all I can select are the "close", "Active" and "completed" buttons.

Does the quest journal have a setting that allows it to be controlled via the keyboard? If so, where is that setting and how do I use it?
Yes, it can be controlled via keyboard. The Dialogue Manager GameObject has a component named InputDeviceManager. The Input Device Manager handles input operations such as detecting whether you're using a keyboard, mouse, joystick, etc. If you're using a keyboard or joystick, it keeps a UI element focused (selected) so you can navigate them using the keyboard or joystick. If you're using a mouse, it doesn't keep a UI element focused unless you tick the Input Device Manager's Always Auto Focus checkbox.

So there are two ways to ensure that you can navigate Quest Machine UIs with the keyboard:

1. Tick Always Auto Focus, or

2. UNtick Detect Mouse Control to prevent the Input Device Manager from detecting the mouse and switching to Mouse mode.

The Basic Standard Dialogue UI prefab uses Unity UI's default button appearance. This button appearance isn't great because it's very hard to tell when a button is focused (selected). Quest titles are configured as button, and tracking checkboxes are also a type of button. If you press the up arrow key or 'W' key from the Active or Close buttons, it will navigate to one of the quest's tracking checkboxes. If you press the left arrow key or 'A', it will navigate to the quest title. Pressing Space or Enter will click the quest title, causing is to show or hide the details.

To make it more apparent, duplicate your quest log window prefab and assign the duplicate to the Dialogue Manager's Instantiate Prefabs component in place of the original. Then customize the duplicate. Inspect the Active Quest Heading Template child GameObject. Customize the colors in the Button component. The whole UI is just plain old Unity UI, so feel free to customize it however you want it to look.
Ameliyn wrote: Fri Jul 22, 2022 6:02 pmAlso, I noticed when I have a quest with entries, the detailed display of the quest shows the success text at all times, even when a quest isn't completed. Did I hook something up wrong or are others having this problem? In the image you can see the initial quest I give players ("Clean up the House"). I turned on the flag to have it select the quest details on start so the details show up on the right. I changed the "ActiveQuestHeadingTemplate" to yellow so that I could see which template is being used to show the Success Description (and as seen, the success description "You stored your things!" is in the detailed description).
It looks like "You stored your things!" is a quest entry. Make sure the entry's state is set to "Unassigned".

If that doesn't help, please post a screenshot of the quest inspector when you inspect the quest in the Dialogue Editor window.
Post Reply