Lock icon alongside responses

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
forrestuv
Posts: 64
Joined: Tue Nov 06, 2018 11:28 am

Lock icon alongside responses

Post 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
User avatar
Tony Li
Posts: 22158
Joined: Thu Jul 18, 2013 1:27 pm

Re: Lock icon alongside responses

Post 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.
Post Reply