Page 1 of 1

Lock icon alongside responses

Posted: Thu Nov 11, 2021 2:16 pm
by forrestuv
Hi,
I need to configure a small lock icon near each response so that player cannot choose it.
What's the best way to disable response and show the icon only on disabled response?

I already created my StandardDialogueUI panel extension that handles a couple of things (and override ShowResponses() where I can do stuff)
Btw I need at least to access instantiated response gameobjects.

thx

Re: Lock icon alongside responses

Posted: Thu Nov 11, 2021 3:35 pm
by Tony Li
The instantiated response buttons are in the Standard Dialogue UI's conversationUIElements.defaultMenuPanel.instantiatedButtons property. You can make a subclass of StandardUIMenuPanel that overrides SetResponseButton().

However, you don't necessarily have to write any code. If you set the response button template's Transition mode to Sprite Swap or Animation, you can have the Disabled state show a lock icon.