Page 1 of 1
Any tips to avoid jumpy Dialogue Panels?
Posted: Sat Dec 12, 2020 12:10 pm
by redisthecolor
Hi there,
first of all thanks for the great asset! Thank God I got to snatch it last minute from the Asset Store Sales.
So yeah I was playing around a bit with Dialogue System and wonder how can I avoid jumpy effect between each dialogue panel when a new dialogue is show?
Any tips to make the panel more user friendly? Looking forward to your input! <3
Re: Any tips to avoid jumpy Dialogue Panels?
Posted: Sat Dec 12, 2020 12:27 pm
by Tony Li
Hi,
Thanks for using the Dialogue System! It looks like it's using a Content Size Fitter to resize to the current content. There are a couple of things you can do:
1. Untick the subtitle panel's Clear Text On Close checkbox.
2. Set a minimum size for the panel. (Add a Layout Element component and set the Minimum Height.)
3. Or, if you don't want the panel to auto-adjust to fix the content size, remove the Content Size Fitter and use a fixed size. In many cases I prefer a fixed size. It makes the UI look more stable.
Re: Any tips to avoid jumpy Dialogue Panels?
Posted: Sat Dec 12, 2020 4:34 pm
by redisthecolor
Hi Tony,
it looks way better now thank you!
The last thing that bothers me is the way the response panel fades away. It took like a good second and then the subtitle panel just slide off to the bottom awkwardly. My question:
- Is there away to keep the response panel visible after player selected the option? (the selected option will be highlighted and the panel will fade away together with the subtitle panel)
Re: Any tips to avoid jumpy Dialogue Panels?
Posted: Sat Dec 12, 2020 7:44 pm
by Tony Li
Hi,
redisthecolor wrote: ↑Sat Dec 12, 2020 4:34 pmIs there away to keep the response panel visible after player selected the option?
Inspect the dialogue UI's Response Menu Panel GameObject. Remove the Animator component. Clear the Standard UI Menu Panel component's Show Animation Trigger and Hide Animation Trigger fields. Untick Deactivate On Hidden.
Re: Any tips to avoid jumpy Dialogue Panels?
Posted: Sun Dec 13, 2020 10:46 am
by redisthecolor
Tony Li wrote: ↑Sat Dec 12, 2020 7:44 pm
Hi,
redisthecolor wrote: ↑Sat Dec 12, 2020 4:34 pmIs there away to keep the response panel visible after player selected the option?
Inspect the dialogue UI's Response Menu Panel GameObject. Remove the Animator component. Clear the Standard UI Menu Panel component's Show Animation Trigger and Hide Animation Trigger fields. Untick Deactivate On Hidden.
Beautiful. It works.
One little problem though. When player selects a button, the normal color is supposed to change to Red. But seems like the style of the button is reseted after the player made a selection
Code: Select all
public void ToggleButtonSelectedColor()
{
theColor.normalColor = theButton.colors.selectedColor;
theColor.highlightedColor = theButton.colors.highlightedColor;
theColor.pressedColor = theButton.colors.pressedColor;
theColor.selectedColor = theButton.colors.selectedColor;
theColor.disabledColor = theButton.colors.disabledColor;
theButton.colors = theColor;
}
This code is called on OnClick(). But seems like it didn't work. Is there any step that I missed here?
Re: Any tips to avoid jumpy Dialogue Panels?
Posted: Sun Dec 13, 2020 3:08 pm
by Tony Li
Hi,
The Standard UI Menu Panel component disables the buttons after the player clicks one. This prevents the player from clicking any of the buttons again.
Try changing the button's Disabled color to the same as the Clicked color or Selected color.
Re: Any tips to avoid jumpy Dialogue Panels?
Posted: Mon Dec 14, 2020 4:50 pm
by redisthecolor
Nice. It works! Thanks!
Re: Any tips to avoid jumpy Dialogue Panels?
Posted: Mon Dec 14, 2020 5:11 pm
by Tony Li
Happy to help!
Re: Any tips to avoid jumpy Dialogue Panels?
Posted: Sun Dec 20, 2020 10:18 am
by redisthecolor
Hi Tony,
in which part of the code / UI do I need to change if I want the ResponsePanel to hide itself (after the conversation ends) // or when a new conversation starts? Because when a new conversation starts, the old ResponsePanel is still visible.
Thanks!
Re: Any tips to avoid jumpy Dialogue Panels?
Posted: Sun Dec 20, 2020 10:37 am
by Tony Li
Hi,
Let's figure out why the response menu panel is still visible. It shouldn't be visible.
- Are there any errors or warnings in the Console window?
- Is the response menu panel's Standard UI Menu Panel assigned to the Standard Dialogue UI component's Conversation UI Elements > Menu Panels and Default Menu Panel?
- Is the Standard UI Menu Panel's Panel field assigned?
- Are you using a prefab dialogue UI? Or one you made from scratch? If it's a prefab (or based on a prefab), which one?