Find the position of a dialogue element

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
jpulliam
Posts: 2
Joined: Fri Sep 26, 2014 7:50 am

Find the position of a dialogue element

Post by jpulliam »

Is there a way to get the screen position of a dialogue element such as the NPC Subtitle so that I can add an additional custom UI element relative to it's position?
User avatar
Tony Li
Posts: 22102
Joined: Thu Jul 18, 2013 1:27 pm

Find the position of a dialogue element

Post by Tony Li »

It depends on what GUI system you're using. Generally speaking, in a script you can access dialogue elements through the UI's xxxDialogueUI script -- for example, UnityDialogueUI.dialogue.npcSubtitle.line.



The dialogue UI implementations provided with the Dialogue System (for Unity GUI, NGUI, DF-GUI, etc.) all have parent panels for the major elements. There's an NPC Subtitle Panel that's a parent of the NPC Subtitle Line. You can place additional dialogue elements as children of the NPC Subtitle Panel, and they'll be displayed whenever the NPC is delivering a line of dialogue.
Post Reply