Hi,
I've just started using Dialogue System. One inspiration for the visual appearance of the dialogue UI is Disco Elysium.
Can you tell me how text indentation like on this screenshot could work?
Thanks
Matt
Text indentation
Re: Text indentation
Hi Matt,
Thanks for using the Dialogue System!
Please see this post. (Briefly: Use TextMesh Pro and the <indent> tag.)
Thanks for using the Dialogue System!
Please see this post. (Briefly: Use TextMesh Pro and the <indent> tag.)
-
- Posts: 19
- Joined: Tue Dec 17, 2019 6:16 am
Re: Text indentation
Thanks Tony, that worked and also gave me an idea how/where to uppercase the speaker names. And glad to see that all the pitfalls are well documented! (Enabling TMP support, rewiring subtitle reference, reimporting directories)
I have one issue, though. I unticked "Add Speaker Name" and cleared the "Add Speaker Name Format" as I understand this is now handled by the OnConversationLine method. Yet, the speaker name and the following subtitle text overlap. It looks as if the 10% indentation is applied to the first line already:
I use the code from your post (plus ToUpper() on the speaker name), the Dialogue Text of this conversation is defined as:
If I understand the TMP indent documentation correctly, the indentation is indeed applied on the first line already? (The space between "1." and "It is" in their sample image doesn't seem to be a regular space.)
EDIT: Another effect I'm seeing is that the TMP Typewriter Effect pauses in the middle of a line.
Any pointers?
Matt
I have one issue, though. I unticked "Add Speaker Name" and cleared the "Add Speaker Name Format" as I understand this is now handled by the OnConversationLine method. Yet, the speaker name and the following subtitle text overlap. It looks as if the 10% indentation is applied to the first line already:
I use the code from your post (plus ToUpper() on the speaker name), the Dialogue Text of this conversation is defined as:
Code: Select all
"Guten Abend, werter Herr! Herzlich Willkommen im Hotel zur Post! Ich hoffe, Sie hatten eine bequeme Anreise?"\.
...
EDIT: Another effect I'm seeing is that the TMP Typewriter Effect pauses in the middle of a line.
Any pointers?
Matt
-
- Posts: 19
- Joined: Tue Dec 17, 2019 6:16 am
Re: Text indentation
After digging into the TMP source code, I found a solution that seems to be working as expected. In TMP_Text.cs line 8342 of TMP preview.2 2.1.0, I changed
to
Meaning: only if the cursor is not yet further than the requested indentation, move it to the desired position; otherwise ignore it for the current line.
I am just leaving this here because it might help other Dialogue System users, but it's probably more a bug / suggestion for improvement for the TMP forums. Also, it needs refinement in case of RTL texts.
Tony, the typewriter pause issue still persists, though. Any advice appreciated!
Matt
Code: Select all
m_xAdvance = tag_Indent;
Code: Select all
if (m_xAdvance < tag_Indent)
{
m_xAdvance = tag_Indent;
}
I am just leaving this here because it might help other Dialogue System users, but it's probably more a bug / suggestion for improvement for the TMP forums. Also, it needs refinement in case of RTL texts.
Tony, the typewriter pause issue still persists, though. Any advice appreciated!
Matt
Re: Text indentation
Hi,
I'm back in the office and see you started a separate thread for the typewriter topic. I'll check it out and reply there.
I'm back in the office and see you started a separate thread for the typewriter topic. I'll check it out and reply there.