Page 1 of 1

Accessibility Option

Posted: Mon Apr 22, 2024 11:17 am
by Albyd
Hi there,
I'm creating some accessibility options for the game I'm currently working on.
This will be a game for people with special needs, some of them with severe visual impairments.
Given this reason, I'm currently thinking of creating an option window that will allow the user to choose between different version of the Dialogue interface.
Is there a way to make this change happen on a click of a button and moreover, will this change be stored when I save the game?
What would be the best way of doing it?

Many thanks,
Alberto

PS: sorry for the number of questions

Re: Accessibility Option

Posted: Mon Apr 22, 2024 12:04 pm
by Tony Li
Hi Alberto,

You can use the C# method DialogueManager.UseDialogueUI(ui) to assign a different UI.

Re: Accessibility Option

Posted: Mon Apr 29, 2024 5:43 am
by Albyd
Thanks, bud, it works.
What if i want to make a button that changes the UI color when the dialogue is playing?
Currently, the button that changes the colour of the UI is located Outside the Dialogue UI Prefab, so I can't show the changes in the UI in real-time.

Is there a way to do this?

Re: Accessibility Option

Posted: Mon Apr 29, 2024 8:13 am
by Tony Li
Hi,

You can access the dialogue UI in C# using DialogueManager.standardDialogueUI. For example, to change the color of the main Dialogue Panel's image:

Code: Select all

DialogueManager.standardDialogueUI.conversationUIElements.mainPanel.GetComponent<Image>().color = Color.red;