Page 1 of 1
Find the position of a dialogue element
Posted: Fri Oct 17, 2014 6:25 am
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?
Find the position of a dialogue element
Posted: Fri Oct 17, 2014 7:00 am
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.