Hi Tony,
I'm using a Scrolling Dialogue UI (Standard Dialogue UI) with the dialogue accumulated. What I'm trying to achieve is that whenever a new segment of dialogue pops up, I want it to scroll up at a specific position. Is there a way of doing this?
For instance, I want "Feng: You've taken care of your" in the 6th line when it pops up.
UI: Keep the first line of the new dialogue in a certain position
Re: UI: Keep the first line of the new dialogue in a certain position
Hi,
I don't quite follow. But this may be something where you need to do a little scripting. You could make a subclass of StandardUISubtitlePanel and override the ShowContent method to change its default behavior.
If that doesn't help, can you provide a few more mock-up images (e.g., maybe some interim steps) that help clarify what you want to happen?
I don't quite follow. But this may be something where you need to do a little scripting. You could make a subclass of StandardUISubtitlePanel and override the ShowContent method to change its default behavior.
If that doesn't help, can you provide a few more mock-up images (e.g., maybe some interim steps) that help clarify what you want to happen?
Re: UI: Keep the first line of the new dialogue in a certain position
Thx for replying!
Sure. Here is a mockup of what I mean. The red arrow indicates the position I want the new subtitle to stay at.
Let me know if I'm making myself clear
Sure. Here is a mockup of what I mean. The red arrow indicates the position I want the new subtitle to stay at.
Let me know if I'm making myself clear
Re: UI: Keep the first line of the new dialogue in a certain position
What if you were to set it up like this?
You'd want to either make a subclass of StandardUISubtitlePanel and override SetContent(), or add a separate script with an OnConversationLine() method. In either case, you'll want to create an additional Text/TextMeshProUGUI element for the "history" text at the top. Before showing a new subtitle, copy the previous subtitle text into this history text.
Tips:
- Set the "history" text to align to bottom left. Add a Mask so taller text won't be seen above the top of the window.
- UNtick the Clear Text On Close checkbox on the subtitle panel.
You'd want to either make a subclass of StandardUISubtitlePanel and override SetContent(), or add a separate script with an OnConversationLine() method. In either case, you'll want to create an additional Text/TextMeshProUGUI element for the "history" text at the top. Before showing a new subtitle, copy the previous subtitle text into this history text.
Tips:
- Set the "history" text to align to bottom left. Add a Mask so taller text won't be seen above the top of the window.
- UNtick the Clear Text On Close checkbox on the subtitle panel.